Software Reliability Methodology Note (i)---chapter II Preparation of Knowledge

Source: Internet
Author: User

Date: 2016.11.12; Location: Nanjing Jiangning Laboratory; state: a confused research;

Why did you read this book? Recommended by the instructor. It can be said that the first time to hear the title is completely blind, just as the choice of undergraduate students to set the topic is the same ... Is in the first half when the teacher told me that he is to do formal, I once thought that my special is not connected to the Automation Institute? I'm mindedly to the computer. Later, until the summer vacation at home idle panic turn over the undergraduate software textbook book, incredibly saw a chapter about formal ... Honey Juice embarrassed, after all, this course at last I got excellent. Cough, pull away. This book is still very suitable for the first contact with the formal people to see, but must have a certain degree of mathematics (so I did not understand at first).

The purpose of this series of blog, after reading this book for the first time there is still a lot of knowledge point is not thoroughly understand, and the teacher has repeatedly mentioned the importance of the book, so now intends to use a week to review the book again. The teacher had asked me to get out of the book to talk about what I saw, so I used this series to make myself a basic understanding of the book as well as to see the relevant papers later.

The first chapter of the book has nothing to say, it is to introduce formal methods, see for yourself. Chapter II Discrete, data structure of the knowledge of the time have been looked at, so a little talk. The focus is on chapter three, which is the basis of the whole book.

Chapter II Preparation of Knowledge

The knowledge of set notation (discrete mathematics), graphs (data structures), and strings (compilation Principles) in this chapter has been learned in undergraduate time, including computational complexity, which is also learned in algorithmic design. So the basic is to review the previous knowledge. What I want to introduce here is only computational complexity.

1. Computational scalability

How do we know that a problem can be calculated? Can all the questions be calculated? Is there a common computational model for storage? These are all problems in theoretical computer science. In the Theory of computational Science, a program language with only four statements is equivalent to computable. Such computable problems can be equivalent to the ability to write in this language. Theoretical computer science has proved that the scale of the computable problem is equivalent to the natural number set, but the whole problem is the real number set, which means that there are problems that can not be computed by computer. Turing's Turing machine, which can be equivalent to the procedure mentioned above, also shows that Turing machine is a universal computer that solves all computational problems.

This chapter introduces Turing, but in the back completely useless to ah, it just asked behind the computational complexity to do the introduction, so you can simply see, if you want to learn more in depth can see the "computational complexity of the Guide" this book.

2. Computational complexity

Algorithm: A simple set of instructions that is clearly specified to be followed in order to solve a problem.

The complexity of the algorithm: Estimating the amount of time or space that an algorithm needs to consume.

The complexity of the algorithm includes: time complexity and spatial complexity, deterministic or indeterminate execution model. The use of Turing can be used to tell the time complexity equivalent to the number of steps of the Turing (Turing only consumes one time unit per execution). And the space complexity is the length of the Turing note.

Definition of complexity:

①o (f (n)) if there are two normal numbers c,c0 so that when n>=c there is t (n) <= O (f (n))

②ω (f (n)) if there are two normal numbers c,c0 so that when n>=c there is t (n) <=ω (f (n))

③theta (f (n)) t (n) = Theta (f (n)) when and only if T (n) = O (f (n)) and T (n) =ω (f (n))

④o (f (n)) T (n) growth rate is less than O (f (n))

  

where O (f (n)) represents the worst case complexity, note O (f (n)) is indeterminate, for example n^2 = O (n^2) and n^2 = O (n^3) is also correct. Because o this is defined by the complexity of T (n) less than O (f (n)), in the complexity, the most important is the highest order exponent form, and the general coefficient of de-absorption.

  

Major complexity classes:

Log---complexity O (logn) problem

Polylog----Complexity is O (P (logn)) problem

The problem of linear---complexity is O (n)

Polynomial---the problem of the Complexity O (P (n))

An O (2^p (n)) problem with exponential---complexity

The problem of the double exponent-----The complexity of O (2^2^p (n))

 

Deterministic and non-deterministic: deterministic complexity means that there is only one successor to each state in the execution model. The non-deterministic model runs a non-deterministic selection in the continuation path, meaning that multiple successor paths can be selected in one state.

Okay, here's the definition of what's important (easy to use), considering the complexity of the above three elements:

①NL the non-deterministic logarithmic space, very efficient algorithm;

②p determines the polynomial time, which is an efficient algorithm, especially when the number of polynomial is low;

③NP uncertain polynomial time, the problem of this kind of problem is that when the uncertainty conversion to determine the time will cause exponential explosion, but many of these problems can use heuristic solution, in which many techniques of machine learning is to solve the NP problem;

④pspace polynomial space;

⑤exptime deterministic exponential time can only be used on small-scale problems;

⑥nonelementary This kind of problem is considered very very difficult to solve. But this is still a computable problem, and there are some problems in the computable theory that can not be solved.

  

  

Software Reliability Methodology Note (i)---chapter II Preparation of Knowledge

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.