[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*From*: Michel Charpentier <michel.ch...@xxxxxxx>*Date*: Thu, 12 Feb 2015 06:18:17 -0800 (PST)*References*: <74871342-8fab-40ff-a050-8ba336333980@googlegroups.com> <CAAWQ4M5tBbNpxm5Sz-EtBL7pt4SdiHbLbw=FZnZLghT33=2WRQ@mail.gmail.com> <CAAWQ4M4jYyePzi-2cUv1QQ7dkHa-_rWA1VKER2pwGHR8JDeCmw@mail.gmail.com> <2311afb9-f5c3-4262-a306-b3308088c1ba@googlegroups.com> <CAAWQ4M5Ema112oVDLXyBho0SUQycyA-ejFqWNA5voORQ5Z4xfA@mail.gmail.com>

My solution "only" enumerates W^N states, not N^W. TLC finds the N=4, W=40 solution on my laptop. It chokes on N=5, obviously.

MC

On Wednesday, February 11, 2015 at 3:03:05 PM UTC-5, Leslie Lamport wrote:

On Wednesday, February 11, 2015 at 3:03:05 PM UTC-5, Leslie Lamport wrote:

Michel's solution requires TLC to enumerate N^W states and then throw away the ones that don't satisfy the entire Init predicate. Hence, it can't handle the original problem with N=4, W=40. My solution requires TLC to construct a much smaller set, so it handles that model. However, it still can't handle much bigger models. Since ProB does not does not require enumerating all cases, it should be able to handle very big models.On Wed, Feb 11, 2015 at 11:33 AM, Michel Charpentier <michel...@xxxxxxx> wrote:Another solution, which I find easier to read: http://cs.unh.edu/~charpov/stone.tla It probably requires more work from TLC but less thinking on my part!MC

On Wednesday, February 4, 2015 at 7:56:27 PM UTC-5, Leslie Lamport wrote:I just posted in the CodePlex repository a TLA+/TLC solution to this problem for arbitrary weight of stone and number of pieces. The repository is atClick on Source Code > examples > Stones. However, I recommend trying to write such a solution yourself before looking at mine.On Wed, Feb 4, 2015 at 1:48 PM, TLA Plus <tlap...@xxxxxxxxx> wrote:Thanks for the puzzle. It took me just a little more time to write a spec that allows TLC to solve the problem than to solve it myself. (However, I had heard it before and so recreating the solution was easy.) TLC found the solution in a few seconds. I will leave this as a puzzle for readers to solve, and I hope others will do the same. I therefore rejected an email someone just sent that reveals the solution, although not the TLA+ spec that allows TLC to solve it. After TLC shows you the answer, the reasoning behind it becomes fairly obvious.On Wed, Feb 4, 2015 at 1:15 PM, step...@xxxxxxxxx <guy...@xxxxxxxxx> wrote:

A farmer has a 40 pound stone and a balance scale. How can he break the stone into 4 pieces so that, using those pieces and the balance scale, he can weigh out any integral number of pounds of corn from 1 pound through 40 pounds.

Who to use TLA+ to specify the problem and use TLC to find the solution?

--

You received this message because you are subscribed to the Google Groups "tlaplus" group.

To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+u...@googlegroups.com.

To post to this group, send email to tla...@xxxxxxxxxxxxxxxx.

Visit this group at http://groups.google.com/group/tlaplus .

For more options, visit https://groups.google.com/d/optout .

--

You received this message because you are subscribed to the Google Groups "tlaplus" group.

To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+u...@googlegroups.com .

To post to this group, send email to tla...@xxxxxxxxxxxxxxxx.

Visit this group at http://groups.google.com/group/tlaplus .

For more options, visit https://groups.google.com/d/optout .

**References**:**Mathematical puzzle modeling***From:*stepha...@xxxxxxxxx

**Re: [tlaplus] Mathematical puzzle modeling***From:*TLA Plus

**Re: [tlaplus] Mathematical puzzle modeling***From:*TLA Plus

**Re: [tlaplus] Mathematical puzzle modeling***From:*Michel Charpentier

**Re: [tlaplus] Mathematical puzzle modeling***From:*TLA Plus

- Prev by Date:
**Re: [tlaplus] Mathematical puzzle modeling** - Next by Date:
**Re: Why Amazon Chose TLA+** - Previous by thread:
**Re: [tlaplus] Mathematical puzzle modeling** - Next by thread:
**"@@" and ":>"** - Index(es):