- 9
- 0
- 约112.35万字
- 发布于河北
- 举报
- 文档已下架,其它文档更精彩
大学,本科,专科,硕士,笔记,课件,期中试卷答案,期末试卷答案,教材答案,知识点,经济法,材料科学基础,材料力学,电路,电子技术基础,高频电子线路,宏观经济学,模拟电路基础,模拟电子技术,数字电路,数字电子技术,数字信号处理,通信原理,信号与系统,化工原理,机械设计基础,机械原理,机械制图,微机原理与接口技术,C++程序设计,JAVA技术与应用,MATLAB基础与应用,计算机网络,计算机组成原理,软件工程数据结构,工程力学,工程热力学,结构力学,力学,流体力学,水力学,工程测量,工程经济学,工
This file contains the exercises, hints, and solutions for Chapter 1 of the
book ”Introduction to the Design and Analysis of Algorithms,” 2nd edition, by
A. Levitin. The problems that might be challenging for at least some students
are marked by ; those that might be difficult for a majority of students are
marked by .
Exercises 1.1
1. Do some research on al-Khorezmi (also al-Khwarizmi), the man from
whose name the word “algorithm” is derived. In particular, you should
learn what the origins of the words “algorithm” and “algebra” have in
common.
2. Given that the official purpose of the U.S. patent system is the promo-
tion of the “useful arts,” do you think algorithms are patentable in this
country? Should they be?
3. a. Write down driving directions for going from your school to your home
with the precision required by an algorithm.
b. Write down a recipe for cooking your favorite dish with the precision
required by an algorithm.
4. Design an algorithm for computing √n for any positive integer n. Be-
sides assignment and comparison, your algorithm may only use the four
basic arithmetical operations.
5. a. Find gcd(31415, 14142) by applying Euclid’s algorithm.
b. Estimate how many times faster it will be to find gcd(31415, 14142)
by Euclid’s algorithm compared with the algorithm based on checking
consecutive integers from min{m, n} down to gcd(m, n).
6. Prove the equality gcd(m, n) = gcd(n, m mod n) for every pair of positive
integers m and n.
7. What does Euclid’s algorithm do for a pair of numbers in which the first
number is smaller than the second one? What is the largest number of
times this can happen during the algorithm’s execution on such a
您可能关注的文档
最近下载
- 【基恩士】IG 系列 用户手册 (简体中文).pdf VIP
- 安徽财经大学《数值分析》2019-2020学年期末试卷.pdf VIP
- 《律师事务所退伙协议》.docx VIP
- SHS 01037—2019 球形储罐维护检修规程.docx VIP
- 文本教案半潜平台se23dec2012workshop binder.pdf VIP
- 《碳达峰碳中和政策法规汇编(2024年9月刊)》.pdf VIP
- 探索式软件测试方法在敏捷开发中的应用研究.docx VIP
- 中国行业标准 YY/T 1226-2022人乳头瘤病毒核酸(分型)检测试剂盒.pdf
- 延安市各区县地表水系图.pdf VIP
- 2025-2026学年一年级数学上册乐考非纸笔测试题(一)(人教版·新教材).docx VIP
原创力文档

文档评论(0)