Buy 1 of item A
7 of item B
7^2 of item C
7^3 of item D
7^4 of item E
7^5 of item F
But there might be a cheaper way?
Correct! Nice. Work shown in spoiler...
Spoiler:
Think of it in terms of a base 7 numbering system...
Total cost of item A will be either 1, 2, 3...6
Total cost of item B will be either 10, 20, 30...60
Total cost of item C will be either 100, 200, 300...600
etc...
So when you convert the total cost to base 7, you can easily determine each item's cost.
DM is right, each combination will produce a unique sum. I made the mistake of just padding the front of the number line - that still works, but it's not optimal.
1. Subtract total cost by 1, then divide by 6. The remainder + 1 is Item A cost.
2. Subtract above quotient by 1, then divide by 6. The remainder + 1 is Item B cost.
3. Subtract above quotient by 1, then divide by 6. The remainder + 1 is Item C cost.
etc...
If the possible prices were 2-7 instead of 1-6, you would do the same above, but add/subtract by 2 instead. Basically, if the prices are sequential, the step is: Subtract by (min range value), divide by (number of items), remainder + (min range value) is the cost for that item. Lather rinse repeat.
There are 50 wires running under the Hudson river with ends for each wire sticking out on both the east and west bank. All wires look the same and you can't tell which end matches up with which. The only way you have to tell which is which is to connect wires at see if they form a circuit. How many trips across the Hudson is required before you can tell exactly which wire is which?
Connect the first 9 wires together, then the next 8 together, etc. down to 2. Call them groups A through H. There will be 6 wires left over, keep them unconnected. Call them group I.
Go to the other side of the river.
I'll hide the second part of the answer in case anyone wants to figure the rest out themselves..
Spoiler:
By testing wires together you can determine which are connected to 8 others (group A), 7 others (group B), etc. Wires not connected to any belong to group I.
From groups A-H, take the first wire from each and connect them together, call this group J. Then connect the second wire from groups A-G (leave the second from group H unconnected), call this group K. Connect the third wires from groups A-F, the fourth wires from groups A-E, etc. Then connect all of the group I wires to different groups (doesn't matter which).
Cross back to the original side of the river.
Now you can test wires to determine which from each of groups A-I belong to each of the groups created on the other side of the river, identifying every connection.
Two robots are parachuted onto a number line. They land randomly on an integer and their parachute detaches. You have to program them so that they meet. You have to give both robots identical programming and you are restricted to the following options:
-Move left 1
-Move right 1
-Go to line of programming __
-If standing on a parachute then move right 1
-If standing on a parachute then move left 1
-If standing on a parachute then go to line of programming __