Thursday, 27 August 2020

'Three Spies Problem'.

By node in this post we understand internet device, network of such form a graph.

Communication from node A to node B can go through other transitory node T or through
transitory nodes T1, T2, ... Tn.

Then we can reach node B with message with 100% success rate if transitory node(s) won't fail.

We can send messages via transitory nodes in many ways.

Let's assume we have three transitory nodes, that is - T1, T2 and T3.

Then we can transmit a message:

1. Via random or predetermined node.

If that node fails, signal needs to be retransmitted.

2. Via all nodes at once, whole message.

It succeeds as long as at least one transitory node does not fail, but signal can be captured easier.

3. Via all nodes, 1/3 of message through each.

Transmission fails if at least 1 node fails. But lost part(s) of message can be resent later. There's less risk of capturing whole signal by opposing forces as well.

4. Via all nodes, 2/3 of message through each. (different 2/3 via each).

Transmission succeeds 100% of time when at least two nodes won't fail. Whole signal is captured if 2 transitory nodes are captured. When one node won't fail, 2/3 of signal are sent, then rest can be transmitted again.

When splitting signal into 2/3, whole has to be encrypted, then split into 3 parts, concatenated (joined) appropriately, then ecrypted each 2/3 again. It's difficult to decrypt message or its parts that way if one has no private keys.

For security, transmission can occur via different nodes (different internet route paths for example), and not at the same time. This can be done via three different internet cafes for example.


See also, if You wish, ... :
- 'Incoming Cipher Crisis'.

Sunday, 23 August 2020

Object State & Context.

About.

State / pl: 'stan' / can be defined in many ways.


Finite State Machine.

A finite-state machine (FSM) / pl: automat skończenie stanowy / is a mathematical model of computation. It is an abstract machine that can be in exactly one of a finite number of states at any given time. The FSM can change from one state to another in response to some inputs; the change from one state to another is called a transition
/ pl: 'przejście', 'funkcja przejścia' /. An FSM is defined by a list of its states, its initial state / pl: 'stan początkowy' /, optionally acceptance (final) state(s) / pl: 'stan(y) akceptujący(-e)', 'stan(y) końcowy(-e)' /, transitions, and the inputs that trigger each transition.

... for more, feel free to look: [ Finite-state machine on Wikipedia ].


Finite State Object.

One can look at object, at it's variables. Variables can be - and are - represented as list of 0's and 1's. Variable values can be concatenated into one list. All of possible permutations of 0's and 1's in this list represent all of possible of this object's states.

Similarly, object's methods can be seen as 'families' of transition functions / pl: 'rodziny funkcji przejścia' / between object's possible states.

In this way, object can be seen as finite state automaton, also called FSM - Finite State Machine.

... i call FSM implemented as object an FSO - Finite State Object.

In FSO, each of possible states can be represented graphically as a dot labelled with its list of 0's and 1's ... and methods are arrows leading from one state to one or more other states. Obviously not every state must be connected with every other possible state. Not every method must change object's state as well ... there's no arrow associated with this method then.


Context.

We can select a group of objects and contain it in another object, then states of contained objects are parts of grouping object's state. Anything outside connected to grouping object can be named 'context' / pl: kontekst /. That is ... context is 'external state'.


Mind States.

I think and feel that buddhism's concept of Mind can be explained as similar to Finite State Machine(s).

For more details, feel free to look: [ Self-Improvement and Mind States ].