Mathematician David Galeproposed the concept of a \"perfect median\" of a sequen
ID: 3616560 • Letter: M
Question
Mathematician David Galeproposed the concept of a "perfect median" of a sequence.(American Scientist, Sept.-Oct. 2008) The sequence 1, 2, 3, 4, 5,6, 7, 8 has a perfect median,
namely 6, because the sum of the terms preceding 6 is equal to thesum of the terms following 6.
Note that for this problem the sequence always starts at 1.
Our goal is to find all perfect medians less than 10,000 by writinga program written in MIPS
assembly language and running on SPIM. I recommend doing a littlemathematical analysis of the problem before writing your code. Youmight reduce the run time significantly. Mathematician David Galeproposed the concept of a "perfect median" of a sequence.
(American Scientist, Sept.-Oct. 2008) The sequence 1, 2, 3, 4, 5,6, 7, 8 has a perfect median,
namely 6, because the sum of the terms preceding 6 is equal to thesum of the terms following 6.
Note that for this problem the sequence always starts at 1.
Our goal is to find all perfect medians less than 10,000 by writinga program written in MIPS
assembly language and running on SPIM. I recommend doing a littlemathematical analysis of the problem before writing your code. Youmight reduce the run time significantly.