You are not logged in. Login Now
 0-18   18-32         
 
Author Message
15 new of 32 responses total.
flem
response 18 of 32: Mark Unseen   Feb 27 22:28 UTC 2000

resp:17 contains a solution.  
aruba
response 19 of 32: Mark Unseen   Feb 28 14:58 UTC 2000

For the third test, the suitor had to send the princess a number x such that
she would send back the reverse of x.  What number x would work?  An extra
bonus would be given if the number x contains no more than 12 digits.
aruba
response 20 of 32: Mark Unseen   Mar 2 02:01 UTC 2000

Well, all valid inputs end with 2.  So if x produces the reverse of x, then
the reveres of x begins with a 2.  So it might be the case that the last thing
that happens is to tack a 2 onto the output.  I.e., x might begin with a 7.
flem
response 21 of 32: Mark Unseen   Mar 2 19:11 UTC 2000

This one was more difficult, but x = 745361745362 does the trick.  
aruba
response 22 of 32: Mark Unseen   Mar 2 19:19 UTC 2000

Looks good.  734173412 also does it.

The Fourth Test:
For this test, the suitor had to send a number x such that the princess would
send back the number x with its last digit erased.  What x would work?
flem
response 23 of 32: Mark Unseen   Mar 3 01:19 UTC 2000

Ah.  I had figured out the 5361 sequence before I got around to playing with
4's.  I probably should have done the fours first, but... 
flem
response 24 of 32: Mark Unseen   Mar 3 02:17 UTC 2000

This one is pretty easy.  There's a 5 digit solution, which might not use the
techniques that the problem is designed for, but is correct.  
  I'm pretty sure that there's only one 5 digit solution, so this might 
be a pretty big hint, but I'll not post it just yet.  
aruba
response 25 of 32: Mark Unseen   Mar 3 03:03 UTC 2000

I got a 5-digit solution too.  It's not the solution he gives in the book.
flem
response 26 of 32: Mark Unseen   Mar 3 18:43 UTC 2000

There's a class of solutions that are inputs of the form x31x312, where 
x meets some conditions.  The most obvious of these is where x = "", the 
empty string:  31312 -> 3131.  I'd be interested to see if the book 
gives any solutions not of this form.  
aruba
response 27 of 32: Mark Unseen   Mar 4 04:13 UTC 2000

The solution in the book points out that 5361x2 yields x1x, so 53615362 yields
5361536.

I believe I can prove that 31312 is the only 5 digit solution.  (At least,
I think I proved it in the shower this morning, but I didn't write it down.)

The Fifth Test:

For this test, the suitor had to send a number x such that the princess would
send back a *different* number y, which the suitor was to send back to the
princess, and she would (hopefully) send back the first number x.

What number x would work?
flem
response 28 of 32: Mark Unseen   Mar 6 17:45 UTC 2000

The easy way (to prove that 31312 is the shortest input that satisfies 
test 4) would be exhaustive testing.  There aren't many valid inputs 
that are 5 digits or fewer:  x1yz2, where x is in { ,1,3,4,5,6,7}, 
and y and z are in { ,1,2,3,4,5,6,7}.  (y and z might possibly be 8,9, 
or 0; I don't recall if the rules allow that or not.)  That's only 
7*8*8 = 448 valid inputs of 5 digits or less.  (847 if y and z can be 
8, 9 or 0.)
aruba
response 29 of 32: Mark Unseen   Mar 6 19:54 UTC 2000

It's OK to use digits 8, 9, and 0.  

Other valid 5-digit inputs look like xy1z2.  But the only ones of those with
4-digit outputs are 331x2, which produce xxxx, and therefore don't qualify.
The only way to get a 4-digit output from x1yz2 is if x is 3, and then you
have 31yz2, which produces yzyz.  So clearly 31312 is the only such which
produces itself minus its last digit.  So there you go.  :)
aruba
response 30 of 32: Mark Unseen   Mar 7 19:47 UTC 2000

Hint on the 5th test (in #27): One way to do this one is to look for an input
x whose output is 1x2.
aruba
response 31 of 32: Mark Unseen   Mar 11 18:32 UTC 2000

Here's another hint:
/---------------------------------------------\
| Find a prefix p such that px2 yields 1xx22. |
\---------------------------------------------/
aruba
response 32 of 32: Mark Unseen   Mar 17 23:00 UTC 2000

We should try to wrap this up by the end of winter agora, so I'll solve test
number 5.  If p = 6477431, then px2 yields 1xx22, which in turn yields xx2.
So therefore pp2 yields 1pp22, which yields pp2.  So one solution is
/-----------------\
| 647743164774312 |
\-----------------/

Onward...

/-----------------------------------------------------\
| The Sixth Test:  The suitor had to send a number x, |
| get back a number y, return y to the princess, and  |
| get back the *reverse* of the original number x.    |
| What number x would work?                           |
\-----------------------------------------------------/
 0-18   18-32         
Response Not Possible: You are Not Logged In
 

- Backtalk version 1.3.30 - Copyright 1996-2006, Jan Wolter and Steve Weiss