1/31/15

Tuple Data Type & Syntax.

i think it's convenient to use tuples as a Data Type, a feature that i've spotted in
'The Go Programming Language'.

i think that Ola AH Programming Language should have that or similar syntactic construct:

int a;
int b;

(a, b) := (b, a);

functions should pass a tuple as their argument as well, as in following or similar syntactic construct:

(int r1, int r2) f(int a, int b, string s) {
  // some code.
  return (result1, result2);
};

See also, if You wish: 'Ola AH' Programming Language, Tuple, Set, Entity, Object, State.

Tuple, Set, Entity, Object, State.

What are differencies between Tuples, Sets, Entities, States & Objects?

in a context of this blog:


Tuple.

Tuples are ordered n-values, for example:
- 0-tuple: (),
- 1-tuples: (1), (a), (c), ...
- pairs (a,b), (3,a), ...
- triples (a,b,c), (1,2,z), ...
- ...


Set.

Sets are unordered n-values, for example:
- empty set: {},
- nonempty sets: { 1, (a,b), {a} }, { a }, { 1, 2 }, ...

i think i remember that every set, including empty set, contains an empty set.


Entity.

'entity' is an 'unordered tuple set', for example a 'table' with 'tuples' in the database.

it is unordered, but can be sorted of course, with any of the 'sorting criteria'.

'metadata' or 'data describing data' can be one of the tuples in this a set, can exist as a 'separate tuple-entity' associated with another 'entity', or might be not present at all.


State.

state is value of all of object's variables concatenated, for example.

there are other definitions as well, many of them valid.

state is not a tuple, but always has properties of a tuple.

one or many a tuple can be part of a state.


Object.

object is state with methods that can change object's state.

objects have lifecycles - series of states that objects have at given moments in time.

transitions between states in lifecycles can be modelled using finite state automatons.


see also if You wish or need, ... : Tuple Data Type & Syntax.

Binary Relation & Stitie Space.

In mathematics, a binary relation on a set A is a collection of ordered pairs of elements of A. In other words, it is a subset of the Cartesian product A2 = A × A.

More generally, a binary relation between two sets A and B is a subset of A × B.

A binary relation R is usually defined as an ordered triple (X, Y, G) where X and Y are arbitrary sets (or classes), and G is a subset of the Cartesian product X Y. The sets X and Y are called the domain (or the set of departure) and codomain (or the set of destination), respectively, of the relation, and G is called its graph.


Example:

we have triple (X, Y, G) with x0 ∈ X, y0 ∈ Y;

if (x0, y0) ∈ G, then:

r0 = {x0 ,y0}.

we can say that (x0, y0) are in a relation r0 ∈ G.


Function:

we can also define binary relation with a function f: X × Y → B, G ⊂ X × Y.

where B is a set of boolean values: B = { true, false }.

(x,y) ∈ X × Y: ( ( f(x,y) = true ) ⇔ ( (x,y) ∈ G ) ) ∧ ( ( f(x,y) = false ) ⇔ ( (x,y) ∉ G ) ).


this is read:

we have a set of pairs (x,y) in a cartesian product X × Y that:

  f(x,y) has value of 'truth' if & only if (x,y) is in G,
&
  f(x,y) has value of 'falsehood' if & only if (x,y) is not in G,


we consider all pairs (x,y) ∈ X × Y.

pair (x,y) is in relation if & only if f(x,y) has value of 'truth'.


Uses:

- Stitie Space can be used to model & visualize relations graphs. we can have even discrete logic that way, with different 'truth objects' possibly forming inheritance tree. falsehood would be lack of any 'truth object' at given coordinates then. 'truths' could differ, but also could have something in common - could be the same or different subclasses of 'supertruth(s)'. this is not the same as 'fuzzy logic' that i understand as joining probablity calculus with boolean algebra, perhaps more.

- Certain types of Binary Relations can be used to determine ordering of elements in data structures.


See also, if You wish: What is a Function?, Ordering a Set, 'Ola AH' Programming Language.

1/30/15

Ordering a Set.

In mathematics, a set is a collection of distinct objects, considered as an object in its own right.

For example: the numbers 2, 4, and 6 are distinct objects when considered separately, but when they are considered collectively they form a single set of size three, written {2,4,6}.

Set elements do not have order by definition, but sets can contain an ordering element that is of strict total order binary relation type, as well.

Then, we can use this ordering element to unambiguously determine order of other elements in our set.

We can say then: 'we have a set S with strict total order relation R', for example.

Cache.

Cache is idea / tool often used in Computing.

When the same data part is being retrieved, for example: from database - we can store most often retrieved values, or lastly retrieved n-values somewhere handy, in a Cache.

For example:

We have data set of 7 values: { (1,a), (2,c), (3,b), (4,a), (5,a), (6,a), (7,a) }.

We have cache that can contain n = 2 values.

We assume that accessing cache is quicker, cheaper than accessing the database. Probably very much.

We have following requests: 1,3,4,3,3,1,7,7.

This goes as follows:

- retrieving pair (1,a) from database; cache = { (1,a) }.
- retrieving pair (3,b) from database; cache = { (1,a), (3,b) }.
- retrieving pair (4,a) from database; cache = { (3,b), (4,a) }.
- retrieving pair (3,b) from cache; cache = { (4,a), (3,b) }.
- retrieving pair (3,b) from cache; cache = { (4,a), (3,b) }.
- retrieving pair (1,a) from database; cache = { (3,b), (1,a) }.
- retrieving pair (7,a) from database; cache = { (1,a), (7,a) }.
- retrieving pair (7,a) from cache; cache = { (1,a), (7,a) }.

Summarizing, with cache that can contain n = 2 values, we have 5 database requests with 3 cache hits instead of 8 database requests.

With larger cache capacity we'd reduce amount of database access requests even more.


Sources: my partial education, probably [7] as well.

See also: Linda, Optimization Triad.

Derivative of a Function.

Let function f be specified in surrounding U of a certain point x0.

f: f(x) = y.


Δy is change in value of function that corresponds to change in value of x-variable Δx.

Thus, we have:

Δy = f(x0 + Δx) - f(x0).



Difference quotient of a function f in a point x0 with a change Δx of a variable x is, then:

Δy = (f(x0 + Δx) - f(x0)) / Δx.


Derivative of a function f in point x0, noted as f'(x0) is difference quotient limit at Δx → 0.

Thus, we have:




Source: [42].

See also, if You wish: Differential of a function.

Symbols in Computer Sciences.

Symbols represent ideas.

Symbols are used in Computer Sciences in many ways - from symbol tables in compilers to entities in Software Systems Modelling.

Paradigms & Programming Languages.

In 'Dragonfly Algorithm' blog author's opinion:

Different Programming Languages are tools for different tasks.

It's like different drills are tools for different tasks.

Depending on the Programming Language(s) certain ways of thinking, models of computation are enforced.

Programming Languages consist of Semantics (meaning) & Syntax (words used, notation).

There are Programming Paradigms, or 'ways of perceiving', obviously related to Semantics.

Syntax should help to understand Language's Paradigm (perhaps composed of many paradigms), determined by Semantics.

Semantics is the code used in language's compilers that determines how certain things are done, at what cost, how to think about certain instructions, or operations.

There are also Models of Computation, that determine what can be done with language:
- Finite State Automatons,
- Stack Machines,
- Turing Machines.

See also, if You wish: Programming Paradigm on Wikipedia, What makes a paradigmatist, Information Technology Paradigms, 'Ola AH' Programming Language, Introduction to Functional Paradigm.

1/28/15

VAP.

Virtual Access Point, also known as Virtual AP, is computer software that uses a Network Device (examples: laptop, LAN-connected PC) to create an access point for other computers or other devices.

This allows devices to connect to the Network such as the Internet using a Wi-Fi signal.

Source: wiseGEEK.

1/25/15

Wireless Network Cards with Linux.

Interfaces.

each of devices in Linux system has it's own interface.

through interface user can control device.

network cards are no exception - each of network cards has one network interface.


Identification.

to learn about network cards & interfaces assigned to network cards, we can use a linux commands.




Commands.



i think, but am no expert:

- i think that driver is a software layer above the hardware (device),
- i think that driver is a software layer below the software layer with which user processes communicate (interface).


another command that lists / controls wireless network interfaces is: iwconfig .




iwconfig command.


access point's nickname can be changed using command: iwconfig ath0 nick AP_NICK

where:
- ath0 is name of a network interface,
- AP_NICK is a nickname to be set.




iwconfig commands.



Network Cards can assume one of few modes (states), in which they can operate.

Modes include, depending on the Operating System & a Device:
- managed mode - network interface recieves only these bits of information that were meant for that network interface,
- promiscuous mode - network interface receives all packets reaching network interface, no matter if they were meant for that interface or not,
- monitor mode - as in promiscuous mode except that it accepts packets that belong to network beyond ours. many network cards do not support monitor mode. with monitor mode we're not associated with any AP (Access Point) or an Ad-hoc Device, which prevents detecting intruder so easily. modern hacking practically requires network card supporting this mode,
- perhaps more.

depending on a Computer System, there are different commands for switching Network Card(s) into different modes:

- iwconfig way (this didn't work on my computer system),

  iwconfig ath0 mode monitor,

- airmon-ng way, as shown on image below,



Mode switch.



Source: [12], [43].

1/15/15

Authentication & Encryption Standards.

Authentication & Encryption Standards have:

- Authentication Protocol,
- Encryption Algorithm.

Known Standards are:

1. Open System.
1.1. authentication protocols used:
- open (none),
1.2. cipher algorithms used:
- open (none),

2. WEP - Wireless Equivalent Privacy.
2.1. authentication protocols used:
- open (none),
- SKA (shared key),
2.2. cipher algorithms used:
- WEP 40-bit,
- WEP 104-bit,

3. WPA - WiFi Protected Access.
3.1. authentication protocols used:
- open (none),
- PSK (WPA Personal),
- MGT (WPA Enterprise),
3.2. cipher algorithms used:
- TKIP,

4. WPA2 - Modified WPA.
4.1. authentication protocols used:
- open (none),
- PSK (WPA2 Personal),
- MGT (WPA2 Enterprise),
4.2. cipher algorithms used:
- TKIP,
- CCMP (AES),
- WRAP.

More advanced Authentication & Encryption Standards use more computing power.

Source: [43].

802.11 Wireless Network Types.

Wireless Fidelity.

'Wi-Fi' is a short for 'Wireless Fidelity'.

'Wi-Fi' is the Standards Set for building Wireless Local Area Networks (WLANs).

'Wi-Fi' allows for wireless communication between devices, without the tangle of the cables.

WLAN modes.

1. Ad-Hoc mode.

- no need for the infrastructure nodes, every network node is equal in passing the information,
- not as fast as it can be.

2. Managed (also known as 'Infrastructure' mode).

- there are Access Points (APs) through which devices communicate,
- similar to star topology,
- there are situations when few Access Points are needed along the way between devices. if 'walls' block wireless signal, APs can form 'a bridge' between these devices.

Source: [43].

1/14/15

Data Transmission Standards.

for devices to be able to communicate, there are requirements (parameters) for:
- signal,
- transmission means between devices.

these parameters are described in so called 'Network Standards'.

---
Network Standards include:

1. IEEE 802.3 - Ethernet.
- wired,
- for devices communication,
- there are versions, for example: IEEE 802.3a.

2. IEEE 802.11 - Generic Radio Wireless Transmission Standard.
- wireless,
- for devices communication in the Radio frequency bands,
- there are versions, for example: IEEE 802.11a.

---
There are multi-channel-joining solutions, but not all devices are ready for such.

---
Different versions of IEEE 802.11 offer different service parameters:
- data transfer speed,
- signal transmission frequency,
- range,
- perhaps more.

IEEE 802.11.
- used frequencies: 2.4-2.5 GHz & 5 GHz,
- transfer speed: 2 Mb/s.

IEEE 802.11a.
- used frequencies: 5 GHz,
- transfer speed: up to 54 Mbps,
- greater range, depending on speed (higher speed, closer range).

IEEE 802.11b.
- used frequencies: 2.4 GHz,
- transfer speed: up to 11 Mbps,
- less of packets lost than in previous standards versions,

IEEE 802.11g.
- backward compatible successor of IEEE 802.11b, devices using 802.11b & 802.11g can communicate without hindrance,
- used frequencies: 2.4 GHz,
- transfer speed: up to 54 Mbps (if all of devices communicate using IEEE 802.11g, or 11 Mbps otherwise),

IEEE 802.11n.
- transfer speeds: up to 300 Mbps (over 100 Mbps is useful),
- uses multiple channels, multiple different frequencies over a frequency band,
- data loss because of checksums, addresses, etc... to verify data 'truthfulness'.

Source: [43], IEEE 802.11 on Wikipedia, IEEE 802.3 on Wikipedia.

1/8/15

Type, State, Context, Object & Class.

in context of this blog:

def. type of an object is class(es) definition (code) in proper version.

def. state is a value from set of all possible values of all object's inner variables. state is called also colour (see also, if You wish: Stitie Machine).

def. exclusive context is outer state (same as state, except that we consider global variables & variables in containing object - in object that contains our object, etc... we can also say that 'application runs in context of this computer system', for example).

def. inclusive context is context with our object inside.

def. context is either inclusive context or exclusive context.

something can be included in a certain context.

examples:
- in context of computer system would be: in the Internet,
- in context of computer system would be: in the Company that owns computer system,
- in state of computer system would be: in memory of computer system.


i think these definitions should be part of 'Ola AH' Programming Language.

---

objects have & are defined by: type & state.

object is runtime instance of it's class.

we can think about classes as about blueprints for objects.

one blueprint is enough to create many objects, that represent something.

each of objects is configured (prepared, set-up) differently perhaps, having different state.


---

see also, if You wish: Objects, Classes, Modelling, Gardener's Functions.

Gardener's Functions.

def. a function of the garden transforms abstract coordinates into an object.

for example: { (0,0,0) -> o1 , (0,0,1) -> o2 }, where o1, o2 are objects.

we have object field with objects at coordinates in n-dimensional space.

each of objects has type & state.

i didn't check other Mathematicians' works well enough as of yet, it's only my definition of one of possible Gardener's functions.

---

a Field in Physics is a physical quantity that has a value for each point in space and time.

---

(to be extended & continued, perhaps)


See also: Escort Field Tactic, Stitie Machine 1.1 'Sunsail', What is a Function?

1/6/15

Escort Field Tactic.

Checking Area.

Once we have formation, we exert control over a certain area.

Units we control check certain area, hindering enemy's movement & positioning, allowing us to secure key units.

If enemy unit(s) enter checked area, they can be attacked.


Positionality.

What if positionality (formation & position) is broken by attacking forces?

it can be restored with reinforcements, new units filling gaps after casaulties, position fought for again, or changed.

but only if we have proper supply lines to reinforce, for example: units reserves, units production.


Fields definitions.

A Field in Physics is a physical quantity that has a value for each point in space and time.

Example of a field of Dragonfly Algorithm is an object field with objects at coordinates
in Stitie Space. Each of objects has type & state.

Escort Field around the unit is checking area of all forces securing the unit.

Security Field around the unit is Escort Field & Units with their positions in Space that secure the unit to be escorted.


A Game of War.

What if objects represent military units? for example robotic drones?

Perhaps we can create a computer game that is simulation of a hypothetical front. Better than killing real beings, for Buddha advises against. But perhaps this game can protect as well, be wary of game's data used by Military.


Supply Forces Management.

Supply Forces Management is preparation (for example: arming, configuration) & movement.

Prepared supply forces are reserve forces in context of this blog.

Units can be reconfigured or rearmed later, after moving from supply to reserve, as well, but this is not 'Supply Forces Management' in context of this blog.


Reinforcement Tactic.

Reinforcement Tactic is Tactic used for reinforcing unit with lost units to restore full positionality, or at least recover formation at different position in space.


Multiple units a unit.

Unit can consit of many units. In context of this blog it's called 'Complex Unit', or 'Distributed Unit'.


See also: Checking Field & Tactics, Internet of Things, the Distributed Machine.