[WSG23] Daily Study Group: Introduction to Discrete Mathematics

A Wolfram U Daily Study Group on Introduction to Discrete Mathematics begins on October 16th 2023.

Join me and a group of fellow learners to learn about the mathematics behind the innovations of computer science using the Wolfram Language. Our topics cover the most well-known branches of discrete mathematics, including logic, sets, discrete functions, sequences, combinatorics, algorithms, proofs, recursion and graphs.

This study group aims to develop a broad understanding of discrete mathematics, with a focus on concepts useful in computer science, software engineering and programming, and make this rich and useful domain accessible for any college student, professional or interested hobbyist. A basic working knowledge of the Wolfram Language is recommended but not necessary. We are happy to help beginners get up to speed with Wolfram Language using resources already available on Wolfram U.

Please feel free to use this thread to collaborate and share ideas, materials and links to other resources with fellow learners.

REGISTER HERE

907486931.gif

13 Likes

Marc Vicuna has done a great job in developing this thoroughly up-to-date introduction to Discrete Mathematics.

I strongly recommend the Study Group to everyone!

4 Likes

Registered! The best Group Theory thing I ever figured out on my own: the late Skwish Toy inventor Tom Flemons pointed out to me that his manufacturing operation made the toy with a single elastic line that was segmented when the balls were glued to the end of the rods. That makes the lines of Skwish an Eulerian Cycle.
In my University class, all of the groups used as examples for cycles, etc., were flat (and boring!) drawings on a page; I suggested to my prof to use the Skwish geometry on a problem set to mix things up a bit. The Manhattan Toy product is the best-selling tensegrity model on the planet, but most of the customers seem to just chew on it. :slight_smile:

1 Like

Hello Wolfram community!

This course will start in 15 minutes! If you’re interested, join us now with the link above!

Happy learning to all!

3 Likes

Hi Marc,

Thanks for creating this great (refresher) course.

Below I share a few minor issues I found:

Issues with lesson notebooks

  • The notebooks are created with a higher version of Mathematica and it
    hangs the Kernel start-up on my machine. Workaround: start
    Mathematica first, then open the notebook.
  • With the Mathematica Welcome Screen open, double-clicking a notebook may not open it.
    Workaround: use Open from the Welcome Screen menu; locate the file
    and open it.
  • Scrolling a notebook, may hang the Kernel after pressing
    the Enable Dynamics button. Workaround: do not Enable Dynamics until
    you’re done scrolling.

BigMarker recording at timecode 25:56

In the recoding of Monday’s Lesson 2 Slide 5 Example (timecode 25:56)

One.png

Should this be: “I did not pass the exam?”

Two.png

Given the logic, should this be “I did not study for the exam, nor did I pass it”?

1 Like

Anticipating today’s lesson on Sets: Can we use abstract symbolic calculations on sets and what is the best way to do it?

For example, can we use Union and Intersection, or should we use the AND and OR operators to make it work? For example ResourceFunction["VennDiagram] uses AND and OR operators.

The context of my question is: Set theory and Logic are used in axiomatic probability i.e. for two events A and B, P(A union B) = P(A) + P(B) - P(A inter B).

The same probability becomes cumbersome to manually calculate when there are more than two events i.e. P(A union B union C).

I started with multiple replacement rules (distributive, associative, commutative, idempotency etc) , but then I derived a general equation for which I created code for any number of events > 2, but I had to fudge the notation. I’m sure there is a better way; for instance if we can use Set theory and any symbolic calculation on them.

Clear[P]
P[l_List] := 
 Total@Table[
   Function[a, (-1)^(i + 1) Total[Apply[P, #] & /@ a]]@
    Union[Sort /@ Permutations[l, {i}]], {i, 1, Length@l}]
P /: P[a__, b__] := Quiet@P[a \[Intersection] b]

The result for three events is:

Screenshot2023-10-17085941.jpg


Hello Marc!

I’m here to learn and to offer feedback.

Most of the lessons seemed fine in yesterday’s recording. However, there was an issue with the photo of the woman chosen to portray “disorientation” and “confusion” at the 31:41 time stamp. The photo is misogynistic and inappropriate. Instead, try using a more generic image, such as a stick figure or a confused puppy with question marks all over it. This would be more appropriate and add a touch of humor to the presentation.

See you at 11AM.

Lori

2 Likes

Hi Davendra!

I’ve enjoyed three of your courses. Nice to ‘see’ you again :smiley:

Hello.

Hello Lori,

Thank you very much for your active participation and support for these online courses!

1 Like

Think I heard somebody was looking for references. Here is a general document about Discrete Mathematics found at Yale and distributed under Creative Commons Attribution-ShareAlike 4.0 International license. The link: Notes on Discrete Mathematics

1 Like

Hello Dave,

For the versioning, we’re working on changing it to the correct Mathematica version.
For dynamics, there is not much we can do about it, unfortunately.

For the mistakes in the slides, that is correct, thank you, it will be corrected.

Best,
Marc

Hi Marc,

I am struggling with a statement in “Lesson 4 - Predicate Logic.nb”, Slide 6:

This is a special case of existence. → I agree

It is unique and is denoted by … → Is it correct to say that Mathematica cannot print the right symbolic? Otherwise, the output of “Exists[x, x == -x]” is wrong.

Please clarify.

Hi Marc,

The following request is related to Week1_Polls.nb → Lesson 5 → Question 2.

Life is difficult but fun.

Yesterday, I have learned that the English word but means AND in the logical language.
Do other keywords, like but, exist to translate English sentences into logical statements? Do you have a list of such keywords? Can you please give me a reference?

English is not my first language. Therefore, support is highly appreciated.

1 Like

Hello Dave,

The Wolfram Language does not have symbolic set computations available. In fact, the Wolfram language intentionally does not have a proper theoretical set implementation, since it would require many implementation choices on definitions that may not fit the user. However, you can implement set manually easily with Sort and DeleteDuplicates.

In a sense, this is one major use of boolean expressions: you may simplify and analyze set expressions in logical form, then, when comes to computing actually sets, you may transfer your logical expression to a set expression. The equivalences between set theory and logic guarantee this. See this post for example.

Best, Marc
[1]: https://mathematica.stackexchange.com/questions/169420/how-do-i-simplify-operations-on-sets

1 Like

Thank you, Lori.

This is noted. The poll questions are only used for the study group, so this will not appear on the course framework. However, my courses do tend to use a lot of images. It will be corrected. If you notice any similar problems in the lessons, exercises, or quizzes, feel free to tell us when we don’t catch those mistakes ourselves.

Best, Marc

1 Like

Hello Jürgen,

I’d argue this is the right output. In mathematics, usually, we usually indeed write:

Screenshot2023-10-18105954.png

However, in code, the Wolfram Language uses a different but equivalent notation, where the variable is written as a subscript. This will still evaluate as you would expect. For example, Reduce[Exists[x, x == -x]] return True.

Hello!

Marc

Hi Jürgen,

Thank you for the great question, this is likely useful for many.

Let’s start with or. Usually, this operator is the simplest to recognize, you’ll find it when using “or” and it is sometimes implied when a choice is given. However, in day-to-day language, it is often confused with xor, the exclusive or. In our course, every time either is used, it is xor, anywhere else, or means or. In real situation, you may have to require your client to specify what is meant.

For the case of “and”, while “and” is often used, it is also often implied. For example, in the line “this excellent white shredded French cheese”, this cheese is excellent AND white AND shredded AND French. When searching for “and”, it’s best to think about what is said to be simultaneously true, and put in a conjunction all those statements. When and is not used, synonyms include but, however, along with, plus, also, as a consequence, as well as, furthermore, including, moreover, together with. Note two notable ways to get a negative “and”, in the form “not p and not q”: “nor” and “neither” are usually used to denote a negative and.

By far, the most difficult operator to recognize is the “implies” operator.
There is p is a sufficient condition for q, p only if q, p implies q, q whenever p, q is a necessary condition for p (i.e., if not q, then not p), or ¬ q→¬ p, q is a consequence of p, q follows from p, q if p, if not q, then not p. See this post. Generally, if you see “if”, “implies”, you are in a conditional statement. When analyzing conditional, be also careful to determine which is the condition, and which is the implication.

Logic is everywhere, so people have all kinds of ways of expressing their reasoning. Sometimes, it just takes patience.

2 Likes

Thank you Marc,

I will explore the route to simplify and analyze set expressions in logical form and transfer them to sets later.