Jump to content

How the hell do you solve this?


Stark

Recommended Posts

http://www.olympiad.org.uk/papers/2010/bio/bio-10-exam.pdf

 

Question 3 ^

 

I've gotta do this olympiad some time in the next week. Can't get my head around how to do question 3 from this past paper. I can brute force it, but it'd take forever..Especially with the ones that require a hell of a lot of steps.

 

Any ideas?

Link to comment
Share on other sites

Well I'd start by looking at what numbers between 100,000 and 999,999 don't repeat any digits, and then figure out if those are "anagram numbers".

The amount of numbers that don't repeat digits in that range are:

 

9*9*8*7*6*5 = 136080.

 

So you have 136080 numbers between 102,345 and 987,654 that don't repeat a digit. Then to check if they're anagram numbers, you have to do *at most* 8 multiplications of those numbers by a single digit 2 through 9. Lets say it takes 6 tries on average (assuming most numbers aren't anagram numbers). That's still only ~600,000 multiplications you have to do, which any modern-day computer could do very quickly.

 

Edit: OH LOL I WAS LOOKING AT Q1 PART 3

Edited by Toph
Link to comment
Share on other sites

Looks like you could use a directed graph with each edge having a weight. Then compute the shortest path to a node T containing the total flow that you want to have, and that path would be the steps needed to get to T capacity. Not sure, im trying to study for my finals also, so just briefly skimmed over it. :P

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...