状态与信息

状态与信息

刘建文略译( http://blog.csdn.net/keminlau )

KEY:信息处理 计算理论 编程语言 状态是什么

State (computer science)

From Wikipedia, the free encyclopedia

In computer science and automata theory, a state is a unique configuration of information in a program or machine. It is a concept that occasionally extends into some forms of systems programming such as lexers and parsers.

在计算机科学和自动机理论领域里,状态(state)的概念是指程序或机器的一个唯一的信息格局(unique configuration),换句说,机器可以有多个互不相同的格局,每一个格局叫状态。

Whether the automaton in question is a finite state machine, a pushdown automaton or a full-fledged Turing machine, a state is a particular set of instructions which will be executed in response to the machine's input. The state can be thought of as analogous to a practical computer's main memory. The behavior of the system is a function of (a) the definition of the automaton, (b) the input and (c) the current state.

无论是那种类型的自动机——有限状态机、下推自动机还是全能的图灵机,自动机的[状态 ]是指数条指令的组合,这些指令的执行对应于一个机器的输入。状态的概念也可比喻成实际计算机的主存。系统的动态行为是以下三者的函数:第一,自动机(的定义);第二,输入;第三,当前的状态。

三种类型的状态

Compatible states - are states in a state machine which do not conflict for any input values. Thus for every input, both states must have the same output, and both states must have the same successor (or unspecified successors) or both must not change. Compatible states are redundant if occurring in the same state machine.

Equivalent states are states in a state machine which, for every possible input sequence, the same output sequence will be produced - no matter which state is the initial state.

Distinguishable states are states in a state machine which have at least one input sequence which causes different output sequences - no matter which state is the initial state.

信息的产生

In information processing, a state is the complete set of properties (for example, its energy level, etc. see state (physics)) transmitted by an object to an observer via one or more channels. Any change in the nature or quantity of such properties in a state is detected by an observer and thus a transmission of information occurs.

在信息处理的语境里,状态是信源对象通过一条或多条信道传递给信宿(observer)的一集属性(set of properties)。也就是说,状态是数个属性的组合 ;组合的任何变化,包括属性的质变和量变,都能被信宿发现,这种状态变化就有信息的产生。

Program state

From Wikipedia, the free encyclopedia

One of the key concepts in computer programming is the idea of state, essentially a snapshot of the measure of various conditions in the system. Most programming languages require a considerable amount of state information in order to operate properly - information which is generally hidden from the programmer. For a real-world example, consider a three-way light switch. An ordinary switch turns on a light when it's in the "up" position, but in a three-way switch the "up" position could be on or off, depending on the state or "configuration" of the other switch, which is likely out of view.

有关[状态(state)]的思想是计算机编程的关键思想概念之一。状态的实质是对系统状况的一个快照 。编程语言之所以有效,程序能按预定高级语义正确的执行是基于大量的状态信息的。这些信息大多数都被隐藏了,对程序员来说这些系统状态是透明的。举一个生活例子,一个三路的照明灯的开关。一个普通的照明灯,开关在“开”的位置时,灯就亮;但在三路开关的情况里,“开”可以是灯亮也可以是灯灭,这要取决于其它开关的状态格局(configuration)。

In fact, the state is often hidden from the computer's hardware as well, which normally has no idea that this piece of information determines program state, while that piece is a temporary variable and will soon be discarded. This is a serious problem, as the state information needs to be shared across multiple processors in parallel processing machines. Without knowing which state is important and which isn't, most languages force the programmer to add a considerable amount of extra code to indicate which data and parts of the code are important in this respect.

实际上状态不仅存于软件世界,也存在于硬件宇宙……

In computer science, imperative programming is opposed to declarative programming. Imperative programming is a programming paradigm that describes computation in terms of a program state and statements that change the program state.

在计算机科学有两种对立的编程范式:命令式编程(imperative programming)和声明式编程(declarative programming)。命令式编程最常见,它是以一种直观的方式描述了计算:程序状态和改变程序状态的表达式。

 

你可能感兴趣的:(编程,properties,input,processing,output,conflict)