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

*From*: Chris Ortiz <zitroomega@xxxxxxxxx>*Date*: Fri, 8 Dec 2023 09:36:36 -0800 (PST)*References*: <b167372b-d453-404c-a0c7-e4a2766c6a27n@googlegroups.com>

Hi Akash, for TLA+ I think instead of set of integers you would like to give it as sequence of integers since sequence has a DOMAIN of unique integer indexes starting from 1 (which is actually the position of the elements in the sequence). But with sequences you can have repeat of the same integer and can change ordering as well which can give you different pairs.

Like you, I am learning TLA+. I found TLA+ for me both for writing algorithms and specifying algorithm. It sometimes help me learn my algorithm better by creating it in TLA+. I hope this helps. Thanks.

On Thursday, December 7, 2023 at 10:52:50 AM UTC-8 Akash Gopalkrishnan wrote:

I'm trying to learn TLA+ to solve Leetcode problems?Is TLA+ for writing algorithms or just specifying algorithms. In other words, do i learn the algorithm first, or can I use TLA+ to create an algorithm?For example, for the classic 2 sums problem:Given a set of integers. and a target value. Find the index of every pair of numbers that sum to the target value. Note: the index cannot be the same in the pair.Thanks so much for the help!

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+unsubscribe@xxxxxxxxxxxxxxxx.

To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/0c3b8b49-8fff-4596-a0f6-e3215c304d32n%40googlegroups.com.

**References**:**[tlaplus] How do you think abstractly***From:*Akash Gopalkrishnan

- Prev by Date:
**Re: [tlaplus] Does TLA+ have a feature where a certain operator is true if and only if a new, different state is produced in the next action?** - Next by Date:
**Re: [tlaplus] How do you think abstractly** - Previous by thread:
**[tlaplus] How do you think abstractly** - Next by thread:
**Re: [tlaplus] How do you think abstractly** - Index(es):