For other uses, see Algorithm (disambiguation).
Flow chart of an algorithm (Euclid's algorithm) for calculating the greatest common divisor (g.c.d.) of two numbers a and b in locations named A and B. The algorithm proceeds by successive subtractions in two loops: IF the test B ≥ A yields "yes" (or true) (more accurately the number b in location B is greater than or equal to the number a in location A) THEN, the algorithm specifies B ← B − A (meaning the number b − a replaces the old b). Similarly, IF A > B, THEN A ← A − B. The process terminates when (the contents of) B is 0, yielding the g.c.d. in A. (Algorithm derived from Scott 2009:13; symbols and drawing style from Tausworthe 1977).
In mathematics and computer science, an algorithm (Listeni/ˈælɡərɪðəm/ al-gə-ri-dhəm) is a self-contained step-by-step set of operations to be performed. Algorithms perform calculation, data processing, and/or automated reasoning tasks.
The words 'algorithm' and 'algorism' come from the name al-Khwārizmī. Al-Khwārizmī (Persian: خوارزمی, c. 780–850) was a Persian mathematician, astronomer, geographer, and scholar.
An algorithm is an effective method that can be expressed within a finite amount of space and time[1] and in a well-defined formal language[2] for calculating a function.[3] Starting from an initial state and initial input (perhaps empty),[4] the instructions describe a computation that, when executed, proceeds through a finite[5] number of well-defined successive states, eventually producing "output"[6] and terminating at a final ending state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as randomized algorithms, incorporate random input.[7]
The concept of algorithm has existed for centuries; however, a partial formalization of what would become the modern algorithm began with attempts to solve the Entscheidungsproblem (the "decision problem") posed by David Hilbert in 1928. Subsequent formalizations were framed as attempts to define "effective calculability"[8] or "effective method";[9] those formalizations included the Gödel–Herbrand–Kleene recursive functions of 1930, 1934 and 1935, Alonzo Church's lambda calculus of 1936, Emil Post's "Formulation 1" of 1936, and Alan Turing's Turing machines of 1936–7 and 1939. Giving a formal definition of algorithms, corresponding to the intuitive notion, remains a challenging problem.[10]
สำหรับการใช้งานอื่น ๆ , เห็นขั้นตอนวิธี ( disambiguation )แผนภูมิการไหลของขั้นตอนวิธี ( อัลกอริทึมของยูคลิด ) เพื่อคำนวณตัวหารร่วมมากที่สุด ( เส้นระดับ ) สองจำนวน A และ B ในสถานที่ที่ชื่อ A และ B โดยขั้นตอนวิธีดำเนินการต่อเนื่องลบสอง loops : ถ้าสอบ B ≥เป็นผลผลิตที่ " ใช่ " ( หรือจริง ) ( เพิ่มเติมแม่นยำเบอร์ B ในสถานที่ บี มากกว่าหรือเท่ากับตัวเลขในสถานที่ ) , ขั้นตอนวิธีการกำหนด← B B − ( −ความหมายหมายเลข B เป็นแทนที่เก่า B ) ในทำนองเดียวกัน ถ้า A > B แล้ว←เป็น− 2 . กระบวนการสิ้นสุดลงเมื่อ ( เนื้อหา ) B เป็น 0 ให้ผลผลิตจากเส้นระดับ ใน A ( อัลกอริทึมที่ได้จาก สกอตต์ 2009:13 ; สัญลักษณ์และรูปแบบการวาดภาพจาก tausworthe 1977 )ในคณิตศาสตร์และวิทยาการคอมพิวเตอร์ขั้นตอนวิธี ( listeni / ˈæผมɡə R ɪðə M / al-g เพลงชาติ - DH ริเพลงชาติ M ) เป็นชุดของการดำเนินงานในขั้นตอนโดยขั้นตอนจะถูกดำเนินการ แสดงการคำนวณขั้นตอนวิธีการประมวลผลข้อมูล และ / หรืองานอย่างอัตโนมัติคำขั้นตอนวิธี " " และ " algorism " มาจากชื่อ khw อุบาสก rizm ī . อัล khw อุบาสก rizm ī ( เปอร์เซีย : خوارزمی , C . 780 – 850 ) เป็นนักคณิตศาสตร์นักดาราศาสตร์ , เปอร์เซีย , นักภูมิศาสตร์ และนักวิชาการวิธีเป็นวิธีที่มีประสิทธิภาพที่สามารถแสดงภายในจำนวนจำกัดของเวลาและอวกาศ [ 1 ] และ [ 2 ] ซึ่งเป็นภาษา ที่เป็นทางการสำหรับการคำนวณฟังก์ชัน [ 3 ] เริ่มจากสถานะเริ่มต้นและเริ่มต้นการป้อนข้อมูล ( อาจจะว่าง ) [ 4 ] คําอธิบายการคำนวณ เมื่อถูกประหารชีวิต รายได้ผ่านจำกัด [ 5 ] จำนวนที่ชัดเจนต่อเนื่องรัฐในที่สุดการผลิต " ส่งออก " [ 6 ] และสิ้นสุดที่ตอนจบสุดท้ายของรัฐ การเปลี่ยนแปลงจากสภาพหนึ่งไปอีก ไม่จําเป็นต้องเป็น deterministic บางขั้นตอนวิธีที่เรียกว่าอัลกอริทึมเชิงสุ่ม รวมสุ่มใส่ [ 7 ]แนวคิดของขั้นตอนวิธีมีมานานหลายศตวรรษ อย่างไรก็ตาม ความเป็นทางการ บางส่วนของสิ่งที่จะกลายเป็นวิธีสมัยใหม่เริ่มมีความพยายามที่จะแก้ entscheidungsproblem ( " การตัดสินใจปัญหา " ) ถูกวางโดยเดวิดฮิลเบิร์ต 1928 ต่อมา formalizations ถูกใส่ร้ายเป็นความพยายามที่จะนิยาม " ที่มีประสิทธิภาพ calculability " [ 8 ] หรือ " วิธีที่มีประสิทธิผล " ; [ 9 ] ผู้ formalizations รวม G ö del ) herbrand – kleene recursive ฟังก์ชัน 2477 2478 1930 และอลองโซโบสถ์ , แคลคูลัสแลมบ์ดาของ 1936 , เอมิล โพสต์ " สูตร 1 " ของ 1936 , และ อลัน ทัวริงเครื่องจักรทัวริงของ 1936 – 7 และ 1939 ให้นิยามของขั้นตอนวิธีการที่สอดคล้องกับความคิดง่าย ยังคงเป็นปัญหาที่ท้าทาย [ 10 ]
การแปล กรุณารอสักครู่..
