Unit 1-Lecture 10:Recursive Data Type
2017-01-10 22:24
513 查看
1 Recursive Data Type Definition
Definitions of recursive data types have two parts:Base case(s) specifying that some known mathematical elements are in the data type, and
Constructor case(s) that specify how to construct new data elements from previously constructed elements or from base elements.
Specifically, to define a function, f , on a recursive data type, define the value of f for the base cases of the data type definition, then define the value of f in each constructor case in terms of the values of f on the component data items.
2 Structural Induction
Structural induction is a method for proving that all the elements of a recursively defined data type have some property:Prove that each base case element has the property.
Prove that each constructor case element has the property, when the constructor is applied to elements that have the property.
Ordinary induction is simply the special case of structural induction on the recursive Definition
3 Induction in Computer Science
Strong induction and its special case of ordinary induction are applicable to any kind of thing with nonnegative integer sizes.Structural induction then goes beyond number counting, and offers a simple, natural approach to proving things about recursive data types and recursive computation.
For recursively defined data types, structural induction is a simple and natural approach.This makes it a technique every computer scientist should embrace.
Reference
[1] Lehman E, Leighton F H, Meyer A R. Mathematics for Computer Science[J]. 2015.相关文章推荐
- 表单form的enctype="multipart/form-data"
- 数据挖掘:Top 10 Algorithms in Data Mining(五)EM算法
- javax.xml.datatype.XMLGregorianCalendar
- ORA-03115: unsupported network datatype or representation
- expression must have same datatype as corresponding expression
- Derived Data Type
- struts中post方式上传文件,enctype="multipart/form-data",request.getParameter("file") 是null的问题分析
- 解决yum错误Error: requested datatype primary not available
- Jackson怎样转换这样的字符串? String jsonStr = "{dataType:'Custom',regexp:'t\\d+',msg:'输入不正确'}";
- Excel公式=SUM(COUNTIF(data,">"&{10,15})*{1,-1})的含义
- .NET-DataColumn.DataType 属性
- Data Type Ranges
- sql server data type conversion - 案例 ( 一 )
- ERROR: Error in Log_event::read_log_event(): 'read error', data_len: 438, event_type: 2
- DataType (System.Type t)转 DbType
- GCC编译“Value too large for defined data type”错误解决办法
- python post content-type:multipart/form-data 类型的表单数据
- How to export/import data with LOB type from one user/schema to another
- Linux mount Windows共享后编译出现“Value too large for defined data type”
- FORM的ENCTYPE="multipart/form-data" 时request.getParameter()值为null问题的解决