-1

Why did the author place "as" between the verb take and the preposition here?

Give an efficient algorithm that takes as input a desired accuracy ϵ > 0 and returns a simple cycle C for which r(C)≥ r*-ϵ.

Can we just simply read it as:

Give an efficient algorithm that takes input as a desired accuracy ϵ > 0 and returns a simple cycle C for which r(C)≥ r*-ϵ.

  • What do you think as is doing in this sentence that would allow you to invert the syntax without a change in meaning? – TaliesinMerlin Jan 26 at 4:54
  • i just would like not to miss anything that author trying to say and try to learn any new usage of as. – Dmomo Jan 26 at 4:59
  • It seems to me asking this question in computing or mathmatics may > the yield of an answer. – lbf Jan 26 at 9:47
  • Takes as input is the conventional phrasing. Think of it as a structured form of English that corresponds to the more formal expression of the algorithm in a programming language. – Global Charm Jan 28 at 7:30
  • @GlobalCharm, So What is the meaning of it in every-day language? I do know that "this kind" of questions seem really stupid, but for someone who learn English as their "second" language just seem like want to understand it better. – Dmomo Jan 28 at 8:09
0

The expression take as input is similar in concept to take as given, which has an entry of its own in the Merriam-Webster.

In the discussion of an algorithm, sometimes we want to focus on the general logic as opposed to the specifics of a particular calculation. We identify some things as constants (pi=3.1416), some things as rules to follow in the calculation, and other things as input. We can then talk about the properties of the algorithm, e.g. that perhaps its speed of execution goes up when the value of the input goes down.

To put this in a larger context: A fundamental model of computation is the Turing Machine, which has input, output, state and transition rules. The expression takes as input has become the conventional form because people have been talking and writing about computer algorithms for many decades now, and distinguishing between input and state is often an important part of the discussion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.