Timeline for Build a solver for the cow and chicken problem
Current License: CC BY-SA 3.0
23 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 17, 2020 at 9:04 | history | edited | Community Bot |
Commonmark migration
|
|
| Aug 28, 2013 at 12:54 | comment | added | Joe Z. | The problem I posted actually only has one solution in the positive integers, but I've updated the program requirements to allow you to be able to treat it as a case of solvability state 6 anyway. | |
| Aug 27, 2013 at 14:43 | comment | added | DavidC | @JoeZ. I included that case above, along with some additional information. | |
| Aug 27, 2013 at 14:40 | history | edited | DavidC | CC BY-SA 3.0 |
further example and explanation
|
| Aug 27, 2013 at 13:23 | comment | added | Joe Z. |
I'll need you to run one more test case... does 6 9 4 6 10 15 return 1 or 6?
|
|
| Aug 23, 2013 at 16:21 | comment | added | DavidC | You are correct. Those will all be caught by condition 1 and the function t. | |
| Aug 23, 2013 at 15:22 | comment | added | Joe Z. | What I mean is, if it's never going to happen with positive-integer inputs, your seventh case is unnecessary. | |
| Aug 23, 2013 at 14:02 | comment | added | DavidC | I'm not sure what you are requesting. If the positive integer problem has a solution pair, then condition 1 is returned. If it has no solution, then condition 5 is returned. What other possibilities exist? | |
| Aug 23, 2013 at 13:59 | history | edited | DavidC | CC BY-SA 3.0 |
Explanation given.
|
| Aug 23, 2013 at 12:52 | comment | added | Joe Z. | Can you come up with a positive-integer problem that doesn't trigger any of the six conditions I gave? | |
| Aug 23, 2013 at 10:56 | comment | added | DavidC |
Exactly. The issue was not whether a complex number is valid for the problem, but rather, what condition should flag it as invalid. It fails each of the first 6 conditions. The 6 conditions, in other words, do not exhaust all of the possible conditions. Hence the need for a seventh "everything else" condition. The condition is satisfied when the first 6 conditions are not met and 3 = 3.
|
|
| Aug 23, 2013 at 2:41 | comment | added | Joe Z. | It's no longer a positive integer, then. The problem statement says that all inputs will be positive integers. | |
| Aug 23, 2013 at 2:36 | vote | accept | Joe Z. | ||
| Aug 26, 2013 at 2:19 | |||||
| Aug 23, 2013 at 2:11 | history | edited | DavidC | CC BY-SA 3.0 |
some golfing
|
| Aug 23, 2013 at 2:09 | comment | added | DavidC | I also threw in a case with a complex number. | |
| Aug 23, 2013 at 1:57 | history | edited | DavidC | CC BY-SA 3.0 |
added 77 characters in body
|
| Aug 23, 2013 at 1:53 | comment | added | DavidC | The additional test case returns 2, as expected. | |
| Aug 23, 2013 at 1:51 | history | edited | DavidC | CC BY-SA 3.0 |
included another test case
|
| Aug 23, 2013 at 1:11 | comment | added | Joe Z. |
I guess I should have included more test cases. Could you run 7 14 9 6 25 18 by and see if it returns 2?
|
|
| Aug 22, 2013 at 23:52 | history | undeleted | DavidC | ||
| Aug 22, 2013 at 23:51 | history | edited | DavidC | CC BY-SA 3.0 |
Conditions are now returned.,
|
| Aug 22, 2013 at 22:15 | history | deleted | DavidC | via Vote | |
| Aug 22, 2013 at 22:12 | history | answered | DavidC | CC BY-SA 3.0 |