HP Forums
Set Theory - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: Set Theory (/thread-12916.html)

Set Theory - Leviset - 05-03-2019 04:12 PM

Lately I’ve been revisiting some work I did using Set Theory 10 years ago.
Having not come back to Programmable Calculators until 2016, a long gap from programming the HP-97 back in 1981.
I haven’t got the length and breadth of experience that you guys/gals have with Programmable Calculators - some of it amazing and highly technical.
My best working calculators I have are the HP-41CX and HP-15C plus a DM41 and DM16.
I like that you’ve been very supportive of some probably simple questions to you but not to this 70 year old semi-retired Mathemation!
Back to Set Theory - I’ve done a fair bit of looking for anything Set Theory related on The Museum USB Stick and online.
Can anyone point me towards any articles or software that I could use on both my vintage HP Calculators and/or my later models, namely HP Prime (1st edition) or my HP-50G that relates to Set Theory please?
Finally do nearly all HP-42S programs run on the HP-41CX?

RE: Set Theory - John Keith - 05-03-2019 07:00 PM

The Prime includes the basic set operations (union, intersection, difference). The HP 50 does not, but they are included in GoferLists.

The GoferLists commands are a bit slow, so I posted some more-or-less equivalent programs in this thread. They require the ListExt Library.

IMHO, both of the above-mentioned libraries are essential for anyone doing list-based programming on the HP 50.


RE: Set Theory - Thomas Okken - 05-03-2019 09:27 PM

(05-03-2019 04:12 PM)Leviset Wrote:  do nearly all HP-42S programs run on the HP-41CX?

Judging by my own collection, I'd have to say no, absolutely not. I do have a few programs that will run on the 41CX (or even on the 41C), but those are all programs that were originally written for those calculators.

Around 80% of the programs in my collection make use of features like named variables, matrices, or the solver, and would not run on the 41CX without at least extensive modifications. Those features are so powerful and so versatile that they tend to crop up in almost any nontrivial program you'll write on the 42S.

RE: Set Theory - Karl-Ludwig Butte - 05-04-2019 12:56 PM

Hi Dennis,

maybe you'll like to have a look at my article "The Secret of the Aleph" where you'll find some background about Georg Cantor and a program to calculate a power set for the HP-50G.

Have fun.

Best regards


RE: Set Theory - Leviset - 05-04-2019 11:49 PM

Karl - Thanks

RE: Set Theory - Jonathan Busby - 05-05-2019 03:12 PM

The method I have used when manipulating sets on my HP48GX is based off of the fact that the power set of a set of size N is 2^N . One might be tempted to construct the power set by iterating through all 2^N values, bitwise, but that is very inefficient. A better method is to use a gray code counter so that to build a power set, only one element has to be altered at a time.



EDIT : If you really want to be pedantic then the number of subsets is 2^N - 1, but technically, since every set includes the empty set { } then it's 2^N Tongue