1: Intro041 - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

1: Intro041

Description:

???? ??? ?': ?????, ?????,???? ????? ... ???? (data): ?????, ??????, ?????? ... ????? ?????: windows, linux, palm. ??? ?????: J-creator ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 21
Provided by: csBg
Category:
Tags: creator | intro041

less

Transcript and Presenter's Notes

Title: 1: Intro041


1
???? ????? ?????
  • ????? 1 ???? ???? Intro041

2
??? ???
  • ???? ??? ?' ?????, ?????,???? ?????
  • ???? ????? ?????? ?? ?????? ????? \ ?????,
    ????????, ???????, ???..
  • ???? ?????? GCD, ???? ???? ??????????.
  • ????? ??????.

3
?????
  • ??? ?? ??? benmoshe_at_cs.bgu.ac.il
  • ???? ???? ??? ?, 12-14 ????? 58\315
  • ??? ????? www.cs.bgu.ac.il/intro041
  • ???? intro041_at_cs.bgu.ac.il

4
?????? ???????
  • ????? (??????) ???, ??????,????, ???.
  • ????? ???? ????, ????? (?????????).
  • ?????? ????? ????, ??? ?????.
  • ???? ??? ???? ???????.
  • ???????? ??? ?????? ???? ??????? (????? ????).

5
???? ????? - ?????
6
???? ????? - ?????
  • ????? ???? ????, ????? (?????????), ????.
  • ???? ??? ???, ??? ????? (C,java) ??? ?????,
    ????? ??????.
  • ????? ?????
  • ??? ??? ? java , ???? ?????.
  • ????????? java ???? ?????(byte code)
  • ???? ????? ??????, ?????.

7
?????? ???????
  • ???? (data) ?????, ??????, ?????? ...
  • ????? ????? windows, linux, palm
  • ??? ????? J-creator
  • ????????, ???, ????.
  • ???? ???????

8
??? ?????
  • ??? ????? ??????? ?????? ?????.
  • ???? ???, ???, ??? ???.
  • ??????? ?????? ????????
  • ????? ????????.
  • ????? ?? ????? ???? ??????.
  • ????? ?? ????? ????? (?????).
  • ????? ????.

9
????? ????? - GCD
  • ?????? ??? ?????? ?????? x,y , ???? ????? ??
    ????? ?????? ???????? ????.
  • ???? ?????? ?? ????? ????? ???????? ????
  • ???? ????? ??? ????? ?? ?????
  • ???? ?????? ??????? ???? ????.
  • ????? ??? ??????? ?????.

10
????? ??????? - GCD
  • ?????? ???????? ????
  • ?????? ??? ?????? ?????? x,y ???? ????? ?? ?????
    ????? ????? ????? z, ?? ???????
  • x/z n1, y/z n2
  • ? n1,n2 ?? ?????? ??????.
  • ?? ???? ????? ?? n1,n2??
  • ??? ???? ?????? ???? ?????? (????????)??

11
????? ????? - GCD
  • ??? ?????? ???? ?? ? z ???????? ?????? ?? ??????
  • ????? ???? ?? ???? ?? z?
  • ??? ????????? ?????
  • ??? ????????? ????? (????? ??????)

12
????? ????? GCD2
  • ?? xy ?????? - ?????? ??? x.
  • ???? ? xgty (???? ????? ?? ???? ??????)
  • ?? x ????? ? y ?????? ?????? ??? y.
  • ???? ???? x ??? ????? x-y ?????? ? 1.

13
GCD2 ????? ??????
  • ??? ????????? ???? ? ????? ???????.
  • ???? ??????.
  • ????? GCD(x,y) r, xar, ybr
  • ???? ?? ? GCD(a,b) 1
  • ??? x-y r(a-b)
  • GCD(a,b)1 ? GCD(b,a-b)1
  • GCD(a,b) GCD(b,a-b)
  • ?????!
  • ??? ???????? ???? ???? ???????

14
?????? ??? ???????????
  • ??? ???????? ???? ???? ???????
  • ????? ??? ??? ???????????.
  • ????? ????? (????? ???) ???' ??? ??? ??????
  • ???? ?? ???? ????????? ????? ??? ????

15
GCD2 ???? ???
  • ?? amax(x,y) , min(x,y) i
  • ?? a ????? ? i ?????? ?????? ??? i.
  • ???? ???? a ??? ????? a-i ?????? ? 1.
  • ??????? ?????? (?????)?

16
????? ????? 3GCD
  • ?? amax(x,y) , min(x,y) i
  • ?? a ????? ? i ?????? ?????? ??? i.
  • ???? ???? a ??? ????? ai, ?????? ? 1.
  • ??? ? - ????? ?? ????? ?????.
  • ??? ????????? ?????
  • ??? ???????? ???? ???? ???????

17
????? ?????? GCD3
  • ??? ????????? ???? ? ????? ???????.
  • ???? ? xgty, ? ? GCD(x,y)lty
  • ???? ?????? GCD(x,y) GCD(xy,y)
  • xga, ygb, GCD(x,y)g
  • x ym k, ???? m ? ? ???? ?????? ? klty
  • x ga ymk gbmk
  • x ga gbmk ? g(a-bm) k
  • GCD(b,a-bm) 1 , ????? (GCD(a,b)1)
  • ?????!

18
????? ??? GCD3
  • int r x y
  • while (r!0)
  • x y
  • y r
  • r x y
  • System.out.println(y)
  • ??? ??????? ?? ???
  • ??? ????' ??? ?????
  • ??? ??? ?????

19
?? ????? ????
  • "???? ????"
  • ??? ?????? ????? ??????? (?????????, byte, ??????
    ..)
  • ???? ????? ?? ???? ?????, ?????..
  • GCD my first algorithm
  • ?????? ????????, ?????, ??????.

20
?? ?????? ???
  • ???? ?????? (?? ?????).
  • ???? ?????? ???? ??????.
  • ??? ???????? ?????? ????? ?????.
  • ????? ???? GCD ???? (???? ??????)
  • ?????? J-creator ??? ??? ???? ????.
Write a Comment
User Comments (0)
About PowerShow.com