Try to find all integers x whose remainder is, 3, and 9, 8, and 7 respectively.

Source: Internet
Author: User

Introduction to algorithms exercise 31.5-2

XLimit 1 (mod 9)

XLimit 2 (mod 8)

XRelease 3 (mod 7)

 

According to the remainder theorem of China,

N = 504

A1 = 1,N1 = 9,M1 = 56,56-1 limit 5 (mod 9)

A2 = 2,N2 = 8,M2 = 63,63-1 limit 7 (mod 8)

A3 = 3,N3 = 7,M2 =-1 limit 4 (mod 7)

C1 = 56 (5 mod 9) = 280

C2 = 63 (7 mod 8) = 441

C3 = 72 (4 mod 7) = 288

 

A

Bytes

1. 280 + 2. 441

+ 3 · 288 (mod 504)

 

Bytes

280 + 882 + 864

(Mod 1, 504)

 

Bytes

10

(Mod 1, 504)

 

Therefore, all the solutions that make the equation come true at the same time are integers in the form of 10 + 504 K (K is an arbitrary integer.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.