Doubting Logic: Boolean Matrix Homework Help

  • Thread starter Thread starter noreturn2
  • Start date Start date
  • Tags Tags
    Matrix
Click For Summary
The discussion revolves around the confusion regarding Boolean matrix multiplication and the accuracy of the answers provided for homework. Participants clarify that Boolean values can only be 0 or 1, and the multiplication process differs from standard matrix multiplication due to the unique rules for addition and multiplication in Boolean algebra. One user points out an error in calculating the upper left entry of the product matrix, emphasizing that the correct value should reflect the dot product while adhering to Boolean rules. The conversation highlights the importance of correctly applying these rules to avoid errors in matrix calculations. Understanding the specific operations for Boolean matrices is crucial for accurate results.
noreturn2
Messages
25
Reaction score
0

Homework Statement


FjMJidm.gif


Homework Equations

The Attempt at a Solution



media%2Fd09%2Fd09fb498-ecfe-475f-b5a1-fbc8fc68c088%2Fphp5JGkPY.png

Does my logic seem right, I'm doubtin my anwsers.
 

Attachments

  • FjMJidm.gif
    FjMJidm.gif
    25.3 KB · Views: 1,779
  • media%2Fd09%2Fd09fb498-ecfe-475f-b5a1-fbc8fc68c088%2Fphp5JGkPY.png
    media%2Fd09%2Fd09fb498-ecfe-475f-b5a1-fbc8fc68c088%2Fphp5JGkPY.png
    19.4 KB · Views: 2,049
Physics news on Phys.org
noreturn2 said:

Homework Statement


View attachment 235016

Homework Equations

The Attempt at a Solution



View attachment 235017
Does my logic seem right, I'm doubtin my anwsers.
Your answers for parts a and b seem OK, but I didn't check that closely, plus you didn't show how the bitwise AND and OR operations are supposed to work.
Your answer to c is incorrect, at least based on how matrix multiplication is normally defined. For the product CC, the upper left entry in the product matrix should be 2, not 1 as you show. This is obtained by calculating the dot product of row 1 of the left matrix with column 1 of the right matrix.
 
Boolean values can only be 1 or 0.

I think you are right that it is still wrong.

I re did it and I got:
[ 1 1 1
0 1 0
1 1 1]
 
noreturn2 said:
Boolean values can only be 1 or 0.

I think you are right that it is still wrong.

I re did it and I got:
[ 1 1 1
0 1 0
1 1 1]
I get something else. Here's what I get for ##C^2##.
##\begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 1 & 0 \end{bmatrix} \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 1 & 0 \end{bmatrix}##
##= \begin{bmatrix}0 & 1 & 1 \\ 0 & 1 & 0 \\ 1 & 1 & 1 \end{bmatrix}##
The entry in the upper left corner deserves some explanation. The 0 value there is the result of the dot product of row 1 on the left (<1, 0, 1>) with col. 1 on the right (<1, 0, 1>^T). From this I get 1*1 + 0*0 + 1*1 = 2, or 102. Since this is 2 bits, it won't fit into 1 bit, we get 0 for the upper left corner of the product.
I'm assuming that's how you're supposed to be doing multiplication of Boolean values.
 
Mark44 said:
I get something else. Here's what I get for ##C^2##.
##\begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 1 & 0 \end{bmatrix} \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 1 & 0 \end{bmatrix}##
##= \begin{bmatrix}0 & 1 & 1 \\ 0 & 1 & 0 \\ 1 & 1 & 1 \end{bmatrix}##
The entry in the upper left corner deserves some explanation. The 0 value there is the result of the dot product of row 1 on the left (<1, 0, 1>) with col. 1 on the right (<1, 0, 1>^T). From this I get 1*1 + 0*0 + 1*1 = 2, or 102. Since this is 2 bits, it won't fit into 1 bit, we get 0 for the upper left corner of the product.
I'm assuming that's how you're supposed to be doing multiplication of Boolean values.

Well if you have 1*1 on any column that value is autoamtically 1. So if you like at row 1 column one on each that is why I get a 1 in the corner
 
noreturn2 said:
Well if you have 1*1 on any column that value is autoamtically 1. So if you like at row 1 column one on each that is why I get a 1 in the corner
I agree that 1*1 = 1, but I was talking about 1*1 + 0*0 + 1*1 = 1 + 1 = 2.
That's how ordinary matrix multplication would be done, but you didn't include any information about how the Boolean values are to be added. For example, 0 + 0 = 0, 1 + 0 = 0 + 1 = 1, but what is 1 + 1? In terms of bits, which are essentially Boolean values, 1 + 1 = 0, with a carry of 1.
 
I do not understand how you calculated part b.
E.g. how do you get that 0 in the second column, first row?
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K