Last visit was: 11 Sep 2024, 07:24 It is currently 11 Sep 2024, 07:24
Toolkit
GMAT Club Daily Prep
Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History
Not interested in getting valuable practice questions and articles delivered to your email? No problem, unsubscribe here.

# The flowchart represents a mathematical algorithm that takes two posit

Tags:
Show Tags
Hide Tags
Intern
Joined: 20 Feb 2012
Posts: 2
Own Kudos [?]: 111 [109]
Given Kudos: 10
Intern
Joined: 19 May 2014
Posts: 1
Own Kudos [?]: 31 [31]
Given Kudos: 0
Current Student
Joined: 23 Oct 2010
Posts: 233
Own Kudos [?]: 1153 [24]
Given Kudos: 73
Location: Azerbaijan
Concentration: Finance
Schools: HEC '15 (A)
GMAT 1: 690 Q47 V38
General Discussion
Kaplan GMAT Instructor
Joined: 25 Aug 2009
Posts: 612
Own Kudos [?]: 657 [2]
Given Kudos: 2
Location: Cambridge, MA
Re: The flowchart represents a mathematical algorithm that takes two posit [#permalink]
2
Kudos
bmwguy wrote:
Attachment:
preppic5.jpg

The flowchart represents a mathematical algorithm that takes two positive integers as the input and returns a positive integer as the output. Processes are indicated in the rectangular symbols in the flowchart. Each process is symbolized by an equation, such as T = T + a. In this particular process, the current values of the variables T and a are added together and the sum then becomes the value of T. For example, if the value of T is 3 and the value of a is 7 before the process T = T + a is completed, then the value of T is 10 and the value of a is 7 after the process is completed.

Use the drop-down menus to fill in the blanks in the following statements based on the algorithm represented by the flowchart.

If 24 and 35 are entered as the values for a and b, respectively, then the first nonzero value of T is: 24, 48, 96, 192, 384.

If 35 and 27 are entered as the values for a and b, respectively, then after the process is completed for the second time, the value of b is: 3, 6, 12, 13, 26.

I think your second question was transcribed incorrectly--"the process" doesn't tell us WHICH process should be repeated twice!
Kaplan GMAT Instructor
Joined: 25 Aug 2009
Posts: 612
Own Kudos [?]: 657 [0]
Given Kudos: 2
Location: Cambridge, MA
Re: The flowchart represents a mathematical algorithm that takes two posit [#permalink]
Injuin wrote:
I got this question correct by simply putting in the values and following the schematic. Was there supposed to be any cool way of figuring out without just plugging the numbers in?

Not that I can see. Near as I can tell, this is similar to "symbol" questions on the quantitative section--simple substitution obscured by a difficult way of expressing the math.
Intern
Joined: 28 Apr 2013
Posts: 9
Own Kudos [?]: 22 [5]
Given Kudos: 3
GMAT Date: 08-03-2013
GPA: 3.3
WE:Supply Chain Management (Military & Defense)
Re: The flowchart represents a mathematical algorithm that takes two posit [#permalink]
5
Kudos
I understand the first value greater than zero for T is 24 as this is the first iteration but we don't output a value for T from the flow chart until b=1 so until we can get b=1 from 37 (b-1 then b/2) we never actually output a value for T. From a computer programming perspective I think this question if flawed if the answer to the first part is 24.
Manager
Joined: 03 Jun 2013
Status:Training
Posts: 69
Own Kudos [?]: 576 [4]
Given Kudos: 3
GPA: 3.7
Re: The flowchart represents a mathematical algorithm that takes two posit [#permalink]
4
Kudos
Nwsmith11 wrote:
I understand the first value greater than zero for T is 24 as this is the first iteration but we don't output a value for T from the flow chart until b=1 so until we can get b=1 from 37 (b-1 then b/2) we never actually output a value for T. From a computer programming perspective I think this question if flawed if the answer to the first part is 24.

Hey,

Whether or not a value is actually an 'output' is irrelevant; usually, in a program, this may be implemented as showing the user a value, or perhaps passing the value to another process.

If they ask about the 'value of T', all that matters is what value it takes on in memory; if you were stepping through the program in a debugger, and you checked for what the variable 'T' contains in memory at each step, you would see all of those values changing regardless of the value actually being 'outputted'.

Hope that helps.
Manager
Joined: 03 Jun 2013
Status:Training
Posts: 69
Own Kudos [?]: 576 [1]
Given Kudos: 3
GPA: 3.7
Re: The flowchart represents a mathematical algorithm that takes two posit [#permalink]
1
Kudos
KapTeacherEli wrote:
Injuin wrote:
I got this question correct by simply putting in the values and following the schematic. Was there supposed to be any cool way of figuring out without just plugging the numbers in?

Not that I can see. Near as I can tell, this is similar to "symbol" questions on the quantitative section--simple substitution obscured by a difficult way of expressing the math.

I agree that given the particular questions that they asked about this pattern, solving it this way is probably the easiest. If they asked questions that required looping through the block diagram many times, however, I feel that pattern recognition would be very important for maximizing time efficiency.

For example, suppose that the first question asked "What is the final value of T?" In that case, iterating through the loop would be too mechanical, and I think it would be more useful to recognize the pattern and calculate the final answer that way.

So essentially, we see that with B = 35 as an initial value, the highest power of 2 contained within 35 is 5, so we know that A will be doubled 5 times, making the final value for A equivalent to 24 * 2^5 = 24*32 = 768. From there, we recognize that A is added to T for every time B takes on an odd value: starting with 35, we can quickly see that 35 is odd, 17 is odd, and 1 is odd, so T will be composed of the first, second, and last values that are taken on by A; i.e, 24, 24*2, 24*32 = 24*35 = 840.

In fact, this algorithm just implements T = A * B, which would be crucial to recognize if we were given very large numbers. I suppose a formal proof for this is probably going too far, but here's a somewhat intuitive explanation:

Suppose we have some arbitrary value for A, and B = 61. The highest power of 2 that is less than 61 is 5 (32), so we know that A will be doubled 5 times; i.e, multiplied by 32. So to get T = A*61, we need to show that T is composed of A*32 + A*(61-32 = 29). Since we know that only A*(powers of 2) are added to T, we can break down T as follows:

61 = 32 + 16 + 8 + 4 + 1 = the sum of the following powers of 2: (0, 2, 3, 4, 5). We can see this relationship by breaking down B = 61 as follows:

61 - 1 = 60 ---------------------------------- Odd
60/2 = 30 -------------- First Halving; 2^1
30/2 = 15, 15-1 = 14 ---- 2^2 ---------------- Odd
14/2 = 7, 7-1 = 6 ------- 2^3 ---------------- Odd
6/2 = 3, 3-1 = 2 -------- 2^4 ---------------- Odd
2/2 = 1 ---------------- 2^5 ---------------- Odd

* Sorry for the poor formatting *

We can see that the number is halved 5 times, corresponding to the 5 times that A is doubled. Beside each layer is marked the corresponding 'doubling' of A.

Now, we recognize that an odd number is encountered at the 2^0, 2^2, 2^3, 2^4, and 2^5 layers, meaning we would be adding A*(1 + 4 + 8 + 16 + 32) to T, equating to 61*A.

I know that was kind of long-winded but hopefully it's useful/interesting to someone. I found it pretty neat.
Intern
Joined: 17 Jun 2013
Posts: 20
Own Kudos [?]: 282 [1]
Given Kudos: 20
Re: The flowchart represents a mathematical algorithm that takes two posit [#permalink]
1
Kudos
If 35 and 27 are entered as the values for a and b, respectively, then after the process b=$$\frac{b}{2}$$ is completed for the second time, the value of b is: 3, 6, 12, 13, 26.

[/quote]

Could someone help me solve the second question ?Thanks
Founder
Joined: 04 Dec 2002
Posts: 38478
Own Kudos [?]: 75192 [6]
Given Kudos: 20932
Location: United States (WA)
GMAT 1: 750 Q49 V42
GPA: 3
Re: The flowchart represents a mathematical algorithm that takes two posit [#permalink]
3
Kudos
3
Bookmarks
Nwsmith11 wrote:
I understand the first value greater than zero for T is 24 as this is the first iteration but we don't output a value for T from the flow chart until b=1 so until we can get b=1 from 37 (b-1 then b/2) we never actually output a value for T. From a computer programming perspective I think this question if flawed if the answer to the first part is 24.

#1 is a slightly confusing question but it is a HARD ONE. The question asks for the "First Value of T" and that assumes not actually calculating the whole process and providing output. The question is asking for Value rather than Output. This was really a "paying attention" question.
Intern
Joined: 08 Jan 2020
Posts: 41
Own Kudos [?]: 43 [0]
Given Kudos: 72
Re: The flowchart represents a mathematical algorithm that takes two posit [#permalink]
1st question, T = 24
2nd question, b = 6
As we enter the logic diagram we get T = 0, then we enter values of a and b and since b is odd, will follow T = T + a, then b = b - 1, then a = 2a and b = b/2.

Posted from my mobile device
Intern
Joined: 03 Jan 2022
Posts: 1
Own Kudos [?]: 2 [2]
Given Kudos: 2
Re: The flowchart represents a mathematical algorithm that takes two posit [#permalink]
2
Kudos
I'm still having trouble understanding why the correct answer for the second question is 3 rather than 6! Can someone please explain?
Intern
Joined: 20 Sep 2021
Posts: 8
Own Kudos [?]: 5 [1]
Given Kudos: 9
Location: Netherlands
GMAT 1: 730 Q47 V42
GPA: 3.4
Re: The flowchart represents a mathematical algorithm that takes two posit [#permalink]
1
Kudos
caroline412 wrote:
I'm still having trouble understanding why the correct answer for the second question is 3 rather than 6! Can someone please explain?

I also do not understand. I get the 6 as well;

start:
b = 27

1. b = b-1 (gives 26)
2. b/2 = 13
3. b = not 1 so repeat.
4. b still odd
5. b=b-1 (gives 12)
6. b/2= 6

So after two times this process it seems that the answer should be 6?
Senior Manager
Joined: 19 Oct 2014
Posts: 363
Own Kudos [?]: 336 [0]
Given Kudos: 188
Location: United Arab Emirates
Re: The flowchart represents a mathematical algorithm that takes two posit [#permalink]
chetan2u Bunuel GMAT Prep shows answer as 3 for Question 2. Could you confirm?
RC & DI Moderator
Joined: 02 Aug 2009
Status:Math and DI Expert
Posts: 11513
Own Kudos [?]: 35936 [0]
Given Kudos: 333
Re: The flowchart represents a mathematical algorithm that takes two posit [#permalink]
rvgmat12 wrote:
chetan2u Bunuel GMAT Prep shows answer as 3 for Question 2. Could you confirm?

Hi

The answer should be 6 for the question the way it is written. May be there are some changes in the wordings. Request if you can share a screenshot
Intern
Joined: 25 Sep 2021
Posts: 1
Own Kudos [?]: 0 [0]
Given Kudos: 7
Location: Brazil
Re: The flowchart represents a mathematical algorithm that takes two posit [#permalink]
Hi ya

can someone explain why the answer for the second question would be 3 rather than 6?
It is written exacly like this:

(1) If 35 and 27 are entered as the values for a and b , respectively, then after the process ​b equals b over 2​ is completed for the second time, the value of b is ()

same flowchart as posted before.
Intern
Joined: 14 Apr 2013
Posts: 2
Own Kudos [?]: [0]
Given Kudos: 4
Re: The flowchart represents a mathematical algorithm that takes two posit [#permalink]
mattce wrote:
Nwsmith11 wrote:
I understand the first value greater than zero for T is 24 as this is the first iteration but we don't output a value for T from the flow chart until b=1 so until we can get b=1 from 37 (b-1 then b/2) we never actually output a value for T. From a computer programming perspective I think this question if flawed if the answer to the first part is 24.

I agree to this observastion ! I was also looking at final output for T until b == 1

Hey,

Whether or not a value is actually an 'output' is irrelevant; usually, in a program, this may be implemented as showing the user a value, or perhaps passing the value to another process.

If they ask about the 'value of T', all that matters is what value it takes on in memory; if you were stepping through the program in a debugger, and you checked for what the variable 'T' contains in memory at each step, you would see all of those values changing regardless of the value actually being 'outputted'.

Hope that helps.

­
Re: The flowchart represents a mathematical algorithm that takes two posit [#permalink]
Moderators:
Math Expert
95450 posts
Retired Moderator
997 posts
RC & DI Moderator
11513 posts