Logic/cs:where to look for examples?

  • Thread starter lizzyb
  • Start date
In summary, the question is asking for the number of relations from a finite set A to a finite set B, with cardinalities m and n respectively. The solution requires logical reasoning, and it is suggested that resources such as Velleman's How to Prove It or Epp's Discrete Mathematics may be helpful. The professor does not seem to require deductive reasoning with symbols, and prose may be used.
  • #1
lizzyb
168
0
Hi - I have homework like:

Question

Let A and B be finite sets of cardinalities m and n, respectively. You may assume m and n are positive integers but you may not assume any ordering of m and n. 1. How many relations are there from the set A to set B?

comments

I'm to arrive at a solution to this question logically, you know, show all the logic, but I'm not sure where to begin. I took a logic course about a year and a half ago and I admit I'm a bit rusty on it.

I purchased Velleman's How to Prove It and have been working through it in order to get up to speed; should I keep studying this book or look somewhere else?
 
Physics news on Phys.org
  • #2
I guess I answered my own question; there is plenty of stuff on the net plus I had a book from years back, Epp's Discrete Mathematics, 2nd; plus I reviewed the earthly-professor's commentary on the homework and I don't think he requires deductive reasoning with symbols (we may use prose).
 
  • #3


I would suggest starting by breaking down the problem into smaller parts and then using logical reasoning to connect them. First, let's define what a relation is in this context. A relation from set A to set B is a subset of the Cartesian product A x B, which is the set of all ordered pairs (a,b) where a is an element of A and b is an element of B.

Next, we can consider the number of elements in A and B. Since we are not given any specific ordering, we can assume that A has m elements and B has n elements. This means that the Cartesian product A x B will have m x n elements.

Now, we can think about how many subsets of A x B can be considered as a relation. This can be visualized by thinking about all the possible ways to choose elements from A x B. Each element can either be included in the subset or not, giving us two options for each element. This means that the total number of subsets or relations is 2^(m x n).

In summary, the logical approach would be to define the problem, break it down into smaller parts, and then use logical reasoning to connect them and arrive at a solution. As for resources, it is always helpful to review concepts from a previous course, but you can also explore other textbooks or online resources for additional practice and examples. Good luck!
 

1. What is logic and how is it related to computer science?

Logic is the study of reasoning and argumentation, while computer science is the study of computers and computational systems. In computer science, logic is used to design efficient and effective algorithms and to prove the correctness of computer programs.

2. Where can I find examples of logic in computer science?

Examples of logic in computer science can be found in various areas such as artificial intelligence, programming languages, and database systems. Some common examples include using logical operators in programming, designing logical proofs for algorithms, and creating logical rules for decision-making in AI systems.

3. How can I improve my understanding of logic in computer science?

One way to improve your understanding of logic in computer science is to practice solving logical problems and proofs. You can also read textbooks and articles on logic and computer science, and attend lectures or workshops on the subject.

4. Are there any online resources for logic in computer science?

Yes, there are many online resources available for learning about logic in computer science. Some popular ones include online courses, tutorial websites, and educational videos. You can also find helpful discussions and resources on online forums and communities dedicated to computer science.

5. How does understanding logic benefit me as a computer scientist?

Understanding logic is essential for computer scientists as it helps in developing logical thinking and problem-solving skills. It also enables you to write efficient and correct computer programs, design algorithms, and make informed decisions in various areas of computer science such as artificial intelligence and database systems.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
956
  • Engineering and Comp Sci Homework Help
Replies
13
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Precalculus Mathematics Homework Help
Replies
4
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
4K
Replies
2
Views
1K
  • General Math
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
504
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
Back
Top