How to Efficiently Handle Set Operations Without Inbuilt Functions?

In summary, the conversation discusses the topics of set theory and DeMorgan's laws. The question asks to find the set ##A-(B\cup C)## and the conversation provides a step-by-step method for finding the solution. The use of DeMorgan's laws is verified through this example, but it is encouraged to also develop the skill of checking answers independently.
  • #1
chwala
Gold Member
2,650
351
Homework Statement
This is my original question; Given ##A=[1,2,x,y]## ##B=[2,x,z,m]## ##C=[4,5]##, then find
##A-(BUC)##
Relevant Equations
set theory
ok we shall have ##(A-B)∩(A-C)= [1,y]∩[1,2,x,y]=[1,y]## correct?
 
Physics news on Phys.org
  • #2
Have you heard of DeMorgan's laws?
 
  • Like
Likes chwala
  • #3
chwala said:
Homework Statement:: This is my original question; Given ##A=[1,2,x,y]## ##B=[2,x,z,m]## ##C=[4,5]##, then find
##A-(BUC)##
Relevant Equations:: set theory

ok we shall have ##(A-B)∩(A-C)= [1,y]∩[1,2,x,y]=[1,y]## correct?
Correct. But it concerns me that you seem unable to check your answers yourself. That is a skill that is just as important to learn as anything else.
 
  • Like
Likes chwala
  • #4
WWGD said:
Have you heard of DeMorgan's laws?
Yes that's what I used...##M-(B∪Q)=(M-B)∩(M-Q)##
 
Last edited:
  • Like
Likes WWGD
  • #5
FactChecker said:
Correct. But it concerns me that you seem unable to check your answers yourself. That is a skill that is just as important to learn as anything else.
I am able to check...I ask because I may want a different perspective from what I know...I am always learning...cheers
 
  • #6
chwala said:
I am able to check...I ask because I may want a different perspective from what I know...I am always learning...cheers
My perspective would be that if you want a simple answer to this, you do the following:

a) Write down the elements of the set ##A##: ##1, 2, x, y##.

b) Write down the elements of ##B \cup C##: ##2, x, z, m, 4, 5##

c) Go through the set ##B \cup C## one element at a time and delete these elements from the list in set ##A##.

1d) That gives the answer ##A - (B \cup C) = \{1, y\}##

If you want to verify De Morgan's law by using this as an example, then fine. But, don't lose sight of the simple fact that ##A - (B \cup C)## means things that are in ##A## with anything that is in either ##B## or ##C## removed.
 
  • Love
  • Like
Likes Mark44 and chwala
  • #7
Yes, it's a good think not to rely only on big formulas , but what if you have similar with a large collection of sets? It becomes a nightmare to do a specific example.
 
  • Like
Likes chwala
  • #8
WWGD said:
Yes, it's a good think not to rely only on big formulas , but what if you have similar with a large collection of sets? It becomes a nightmare to do a specific example.
If I were coding this, without using inbuilt set operations, then I would do it either the way described; or, not bother with the union at all, but just go through ##B## and ##C## separately and delete elements from ##A##. My first step wouldn't be the form the sets ##A - B## and ##A - C##.

For example, pseudocode for ##X = A - (B_1 \cup B_2 \dots \cup B_n)##:

Create set ##X = A##
For ##k = 1## to ##n##:
Remove any element in ##B_k## from ##X##
(or, ##X = X - B_k## for short)
Loop
Print ##X##
 
  • Like
Likes Hall and chwala

What is "Find ##A-(BUC)## set theory"?

"Find ##A-(BUC)## set theory" is a mathematical concept that involves finding the difference between two sets, where the first set (A) is subtracted by the union of two other sets (B and C). This can also be written as A \ (B ∪ C) in mathematical notation.

What is the purpose of "Find ##A-(BUC)## set theory"?

The purpose of "Find ##A-(BUC)## set theory" is to help solve problems involving sets, such as finding the elements that are unique to one set and not shared with other sets. It can also be used to remove elements from a set that are common with another set.

What are the steps involved in using "Find ##A-(BUC)## set theory"?

The steps involved in using "Find ##A-(BUC)## set theory" are as follows: 1) Identify the sets A, B, and C. 2) Find the union of sets B and C. 3) Subtract the union of sets B and C from set A. 4) The resulting set is the difference between A and the union of B and C.

What are some real-world applications of "Find ##A-(BUC)## set theory"?

"Find ##A-(BUC)## set theory" can be applied in various fields such as statistics, economics, and computer science. In statistics, it can be used to compare data sets and identify unique elements. In economics, it can be used to analyze market trends and identify factors that affect demand and supply. In computer science, it can be used to manipulate and organize data in databases.

What are the limitations of "Find ##A-(BUC)## set theory"?

One limitation of "Find ##A-(BUC)## set theory" is that it only works with finite sets. It cannot be applied to infinite sets or sets with an infinite number of elements. Additionally, it may not be suitable for solving complex problems involving multiple sets and operations. It is important to carefully define the sets and operations involved to avoid errors in the results.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
15
Views
819
  • Precalculus Mathematics Homework Help
Replies
3
Views
885
  • Precalculus Mathematics Homework Help
Replies
3
Views
824
  • Precalculus Mathematics Homework Help
Replies
23
Views
1K
Replies
8
Views
789
  • Precalculus Mathematics Homework Help
Replies
7
Views
407
  • Precalculus Mathematics Homework Help
Replies
4
Views
2K
  • Precalculus Mathematics Homework Help
Replies
15
Views
651
  • Precalculus Mathematics Homework Help
Replies
2
Views
902
  • Precalculus Mathematics Homework Help
Replies
23
Views
615
Back
Top