text: # Modular arithmetic
  
  • Feb 28th 2010, 09:03 AM
  integral
  Modular arithmetic
  $\displaystyle \textrm{I\; am\; trying\; to\; learn\; modular\; arithmetic,\; and\; this\; right \; here\; stumped\; me.}$
  $\displaystyle 10\cdot(-13)+27\cdot 6\equiv-122\mathrm{mod}2$
  $\displaystyle \textrm{I\; thought\; It\; would\; go\; like\; this:}$
  $\displaystyle 10\cdot(-13)+27\cdot 6\; \; \; \textrm{Can be reduced to in mod}2$
  $\displaystyle 0\cdot(1)+1\cdot 0=0\mathrm{mod}2$
  
  $\displaystyle \textrm{Please explain this to me someone}$
  • Feb 28th 2010, 10:45 AM
  Bacterius
  Hi Integral,
  
  Suppose you have :
  $\displaystyle 10 \times (-13) + 27 \times 6$
  
  This can be written as :
  
  $\displaystyle (2 \times 5 + 0) \times (2 \times (-6) + 1) + (2 \times 13 + 1) \times (2 \times 3 + 0)$
  
  Note that modulo two, adding two doesn't change the residue, and multiplying by two makes the residue zero. So this simplifies to :
  
  $\displaystyle 0 \times 1 + 1 \times 0$ (mod 2)
  
  And therefore the whole expression is equivalent to zero modulo 2 (it is even). These are just modular arithmetic theorems that need to be learnt (that adding the modulus to terms doesn't change anything, multiplying by the modulus makes the term zero, that the residue of a sum of terms is the same as the sum of the residues of each term, ... then you got the powers and Fermat's/Euler's Theorem ...)
  
  :)
explanation: The document is a discussion about modular arithmetic, specifically focusing on a particular expression and its evaluation under modulo 2. The user, integral, presents a problem and an attempted solution, and asks for an explanation. Another user, Bacterius, provides a detailed explanation of the problem and confirms the correct approach.
distilabel_metadata.content: Evaluate the user given text extract and determine if it contains a math question and optionally and answer to this question.
  
  Output rules:
  
  1. Briefly describe the document and mention if it contains a question or a question and answer.
  2. Finalize the output with: Label: no-question,question,question-and-answer,multiple-question,multiple-question-and-answer
distilabel_metadata.role: system
distilabel_metadata.content: # Modular arithmetic
  
  • Feb 28th 2010, 09:03 AM
  integral
  Modular arithmetic
  $\displaystyle \textrm{I\; am\; trying\; to\; learn\; modular\; arithmetic,\; and\; this\; right \; here\; stumped\; me.}$
  $\displaystyle 10\cdot(-13)+27\cdot 6\equiv-122\mathrm{mod}2$
  $\displaystyle \textrm{I\; thought\; It\; would\; go\; like\; this:}$
  $\displaystyle 10\cdot(-13)+27\cdot 6\; \; \; \textrm{Can be reduced to in mod}2$
  $\displaystyle 0\cdot(1)+1\cdot 0=0\mathrm{mod}2$
  
  $\displaystyle \textrm{Please explain this to me someone}$
  • Feb 28th 2010, 10:45 AM
  Bacterius
  Hi Integral,
  
  Suppose you have :
  $\displaystyle 10 \times (-13) + 27 \times 6$
  
  This can be written as :
  
  $\displaystyle (2 \times 5 + 0) \times (2 \times (-6) + 1) + (2 \times 13 + 1) \times (2 \times 3 + 0)$
  
  Note that modulo two, adding two doesn't change the residue, and multiplying by two makes the residue zero. So this simplifies to :
  
  $\displaystyle 0 \times 1 + 1 \times 0$ (mod 2)
  
  And therefore the whole expression is equivalent to zero modulo 2 (it is even). These are just modular arithmetic theorems that need to be learnt (that adding the modulus to terms doesn't change anything, multiplying by the modulus makes the term zero, that the residue of a sum of terms is the same as the sum of the residues of each term, ... then you got the powers and Fermat's/Euler's Theorem ...)
  
  :)
distilabel_metadata.role: user
distilabel_metadata.raw_output_q_a_detector_0: The document is a discussion about modular arithmetic, specifically focusing on a particular expression and its evaluation under modulo 2. The user, integral, presents a problem and an attempted solution, and asks for an explanation. Another user, Bacterius, provides a detailed explanation of the problem and confirms the correct approach.
  
  Label: question-and-answer