OpenLLM-France/wikimedia huggingface dataset:
# A-level Mathematics/Edexcel/Decision 2

Decision Mathematics 2 is an applied mathematics module for the Edexcel Examination Board, which builds upon the foundations of Decision Maths that were studied in the 'D1' module.
Note: This book is so you can gain an alternative explanation for the concepts described and it should NOT replace your D2 textbook!

## Themes Covered in this Book

* Flows in Networks
* Sinks, Sources and Flows
* Labelling Flows
* Flow Augmenting Paths
* Maximum Flows
* Minimum Cuts
* Multiple Sources and Sinks
* Planarity of Graphs
* Planar Graphs
* The Planarity Algorithm
* Transportation Problems
* The Transportation Problem (TP)
* Formulating TP as a Linear Programming Problem
* Solutions for the TP
* Optimality of Solution
* Unbalanced Problems
* Degeneracy of Solution
* Allocation/Assignment Problems
* Balanced Problems
* Formulating AP as a Linear Programming Problem
* Solution of the AP (Balanced)
* The Hungarian Algorithm
* Optimality of Solution
* Revision of the Opportunity Cost Matrix
* Unbalanced Assignment Problems
* Maximisation Assignment Problems
* The Travelling Salesman Problem
* The Simplex Algorithm
* Game Theory
* Dynamic Programming
# A-level Mathematics/Edexcel/Decision 2/Game Theory

English. Natural science and technology. E.M.S.>Economic Management Science .
# C++ Language/Objects/LowLevelCStructures/Bitfield

A "bitfield" structure member integral_type m_iVar : bit_count; is useful for alignment.
Additional information about bitfields
# C++ Language/Objects/StaticMembers/StaticMemberFunctions

Most member functions conceptually manipulate one specific object, but a member function marked by the static keyword is for computation that is collectively about all objects of that class. The compiler doesn't provide any this pointer to a static-member-function, so a static-member-function can only access static-data-members. Whereas an ordinary member function is invoked on a specific object (oObject.DoAction), any code may invoke a static-member-function without having any object (simply calling CRType::DoAction).
Additional information about static-member-functions
# C++ Language/Objects/LowLevelCStructures

These aspects of class definition are vestiges of the C programming language. They still exist in C++, even though they are not commonly used.
* Union
* Flexible-Array-Member
* Bitfield
# C++ Language/Objects/StaticMembers/StaticDataMembers

A "static-data-member" is a data member marked by the static keyword. It describes one value that is shared by all objects of that class. Generally, a static-data-member must be initialized outside the class definition (by writing int CRType::m_giVar = 11; at the top of some implementation file).
Additional information about static-data-members
# C++ Language/Objects/LowLevelCStructures/FlexibleArrayMember

A "flexible-array-member" is a data member which is an array having unspecified size. A flexible-array-member must be the last member, and there must be at least one normal data member before it.
Additional information about flexible-array-members
# C++ Language/Objects/NestedClasses

An inner class definition may be nested within some outer class definition. The member within that nested class is called CROuter::CRInner::m_iVar (those qualifications are unnecessary for code within that class' member functions).
Additional information about nested classes
# C++ Language/Objects/OperatorOverloading

Programming custom implementations for operators is the mechanism for allowing a custom C++ class to be used as a "value type" (which then can behave similar to built-in primitive types like int). For example, client code expects to be able to do int iX = iY + iZ + 9;; if you want your custom class to also behave that way, then define its const CRType CRType::operator+(const CRType& aroRhs) {body}.
Additional information about operator overloading (includes interactive examples)
# C++ Language/Objects/PointerToMembers

It is very common to use a type which is "pointer to int" (the type's name is int*). Must less common (but still possible) is using a type which is "pointer to int data member of class CRType" (the type's name is int CRType::*).
Additional information about pointers to members (includes interactive examples)
# C++ Language/Objects/StaticMembers

Both data members and member functions could be marked by the static keyword, but the implications of that depend on which kind of member it is.
* Static Data Members
* Static Member Functions
# C++ Language/Objects/LowLevelCStructures/Union

A struct CRType {...}; is the same as class CRType {...}; except for default accessibility.
A union CRType {...}; is also the same, except all members in the union overlap in memory (space in memory is made for the largest member). Only one member can have meaningful data at one time.
Additional information about union
# Chess Opening Theory/1. e4/1...Nc6/2. d4/2...d5/3. Nc3/3...dxe4/4. d5/4...Ne5
## Nimzowitsch Defense

Following 4...Ne5, White could recapture the gambitted central pawn with 5. Nxe4, but following 5...e6! Black is guaranteed good development and almost certain equality.
A more critical response is 5. Bf4, threatening the knight on e5. 5...Ng6 is forced, due to the fact that 5...Qd6?? loses to 6. Nb5! Nf3+ 7. Qxf3!!, and after 6. Bg3, 6...f5 is critical, although largely unexplored.
White can avoid these lines with 5. Qd4, also forcing 5...Ng6. This line is more aggressive, and Black must be careful, but Black can probably equalize.
# Nimzowitsch Defence

This line after 2...e5 is called the Kennedy Variation. It isn't very popular because the main two white options secure a nice advantage. These include 3.dxe5 Nxe5 4.f4! which kicks around the knight and 3.d5 Nce7 4.c4 where white gets a substantial space advantage

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation.
1. e4 Nc6 2. d4 e5
| | 3 |
| | dxe5 Nxe5 | += |
| Scotch Game by transposition | Nf3 exd4 | = |
| | d5 Nce7 | =/+= |
| Kennedy, Linkspringer Variation | d5 Nce7 | Nf3 d6 | Nc3 a6 | Be2 h6 | 0-0 g5 | a4 b6 | b4 Ng6 | g3 Bg7 | a5 b5 | += |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* Kasparov, Garry, & Keene, Raymond 1989 Batsford chess openings 2. ISBN 0-8050-3409-9.
* This Chess related article is a stub. Please assist Wikibooks by expanding it.
# Alekhine's Defence
### 1...Nf6

The main idea of the Alekhine is to allow White to advance and push pawns, which Black can pick at later. While it is not played very often at master level, it is not unsound. White's most popular continuation is 2. e5, and White has dreams of advancing in the center with d4, later c4, and sometimes even f4. Black hopes to attack and destroy White's pawn center in the future.
If White doesn't want to follow the main line, they may simply defend the pawn with 2. Nc3 (which may transpose to Vienna Game).
A sharp variation called the Krejcik Variation consists in playing 2. Bc4. It looks like a gambit, but in fact, if Black plays 2...Nxe4, White can regain the pawn and prevent Black from castling with 3. Bxf7+ Kxf7 4. Qh5+.
The opening is named after Alexander Alekhine, who introduced it in 1921; however, the theory and mainlines were created much later.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation.
1.e4 Nf6
| | 2 | 3 | 4 | 5 | 6 |
| Main Line | e5 Nd5 | d4 d6 | Nf3 Bg4 | Be2 e6 | O-O Be7 | ∞/= |
| | Nc3 d5 | exd5 Nxd5 | Bc4 Nb6 | Bb3 Nc6 | Nf3 Bf5 | = |
| | d3 e5 | Nf3 Nc6 | g3 Bc5 | Bg2 O-O | O-O d6 | = |
| | ... ... | f4 Nc6 | Nf3 d5 | fxe5 dxe4 | exf6 exf3 | =/+ |
| Krejcik Variation | Bc4 Nxe4 | Bxf7+ Kxf7 | Qh5+ Kg8 | Qd5+ e6 | Qxe4 d5 | =+ |
| | ... ... | ... ... | ... g6 | Qd5+ e6 | Qxe4 d5 | =+ |
| | ... ... | ... ... | ... ... | ... Ke8 | Qxe4 d5 | =+ |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* Nunn's Chess Openings. 1999. John Nunn (Editor), Graham Burgess, John Emms, Joe Gallagher. ISBN 1-8574-4221-0.
* Modern Chess Openings: MCO-14. 1999. Nick de Firmian, Walter Korn. ISBN 0-8129-3084-3.
* Kasparov, Garry, & Keene, Raymond 1989 Batsford chess openings 2. ISBN 0-8050-3409-9.
# Alekhine's Defence : Krejcik Variation

This riposte from White is not as dangerous as it looks. The possible sacrifice on f7 seems deadly if Black dares to take the offered pawn (2...Nxe4), but in reality, it just gives black a lead in development after 3. Bxf7+ Kxf7 4. Qh5+ Kg8 5. Qd5+ e6 6. Qxe4 d5! 7. Qe2 e5!.
If Black wants to avoid this, they may try to get the bishop out of c4 with 2...b5. If White takes the pawn, Black can take the e4 pawn and he would have exchanged a wing pawn against a central pawn, but white gets a lead in development and an easier time castling.
Other options include 2...e6 and 2...d5.
To get back into more peaceful lines, Black can transpose to the Bishop's Opening with e5.

# Epine Dorsal

This opening lies along what was referred to in the 19th century as the Épine Dorsale pattern now more commonly referred to as the Italian Game.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
1.e4 Nf6 2.Bc4
| | 2 | 3 | 4 | 5 | 6 |
| | ... Nxe4 | Bxf7+ Kxf7 | Qh5+ Kg8 | Qd5+ e6 | Qxe4 d5! | =/+ |
| | ... b5 | Bxb5 Nxe4 | Nf3 e6 | O-O Be7 | d4 Bb7 | = |
| | ... d5 | exd5 Nxd5 | Nf3 Bg4 | d4 e6 | O-O Bd6 | = |
| | ... e6 | e5 d5 | Be2 Nfd7 | d4 c5 | c3 Nc6 | = |
| Bishop's Opening (by transposition) | ... e5 | Nc3 Nxe4 | Qh5 Nd6 | Bb3 Be7 | Qxe5 O-O | = |
When contributing to this Wikibook, please follow the Conventions for organization.
# Nimzowitsch Defence

White now has a number of viable options against black. 6. Bg5 Bg4 7. f3 Bf5 8. Bb3 Nbxd5 9. Nxd5 Nxd5 and White cannot easily prove an advantage. 6. Bf4 Bf5 7. Bb3 Nbxd5 8. Nxd5 Nxd5 9. Bg3 e6 with equality. 6. Nf3 Bf5 7. Bb3 Nbxd5 8. Nxd5 Nxd5 9. 0-0 e6 is also equal.
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* Kasparov, Garry, & Keene, Raymond 1989 Batsford chess openings 2. ISBN 0-8050-3409-9.
# Nimzowitsch Defence

Black now faces the choice of where to retreat his knight. 4...Ne5 is the main line, but 4...Nb8 is an interesting alternative.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
1. e4 Nc6 2. d4 d5 3. Nc3 dxe4 4. d5
| 4 |
| Ne5 ... | = |
| Nb8 ... | = |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* Kasparov, Garry, & Keene, Raymond 1989 Batsford chess openings 2. ISBN 0-8050-3409-9.
# Chess Opening Theory/1. e4/1...Nc6/2. d4/2...e6

In this position, 3. Nf3 is the most common move. The pawn structure will soon resemble the Advance Variation of the French Defence.
When contributing to this Wikibook, please follow the Conventions for organization.
# Nimzowitsch Defence

White should now attack Black's knight with 4. d5

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
'1. e4 Nc6 2. d4 d5 3. Nc3 dxe4'
| 4 |
| d5 ... | = |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* Kasparov, Garry, & Keene, Raymond 1989 Batsford chess openings 2. ISBN 0-8050-3409-9.
# Nimzowitsch Defence

White's d5-pawn is now attacked twice, he can defend it again with 5. Bc4 developing a piece. Other moves such as 5. Nf3 fail to 5... Bf5 when White must play 6. Bd3 to prevent the fork on c2. This now allows 6... Bxd3 7. cxd3 Nxd5 where material is even and White's pawn structure is significantly worse due to his doubled isolated pawns.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
1. e4 Nc6 2. d4 d5 3. Nc3 a6 4. exd5 Nb4
| 5 |
| Bc4 ... | ∞ |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* Kasparov, Garry, & Keene, Raymond 1989 Batsford chess openings 2. ISBN 0-8050-3409-9.
# Nimzowitsch Defence

White's pawn on d5 is now defended and attacked twice. After 5...Nf6 there is no good way for White to defend the pawn a third time and it will fall. 5...Bf5 seems like a good move as it forces White's bishop to move again with 6. Bb3, but after 6...Nf6 7. Bg5 Nbxd5 8. Nxd5 Nxd5 9. Qf3 Be6 Black's game is worse.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
1. e4 Nc6 2. d4 d5 3. Nc3 a6 4. exd5 Nb4 5. Bc4
| 5 |
| Nf6 ... | ∞ |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* Kasparov, Garry, & Keene, Raymond 1989 Batsford chess openings 2. ISBN 0-8050-3409-9.
# Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Bc5/3. Nxe5
## 3. Nxe5

In the sequence 1.e4 e5 2.Nf3 Bc5, the move 3.Nxe5 is a pawn capture by the white knight. This move is part of a strategy where white aims to gain material advantage early in the game. However, this move can lead to a complex situation.
After 3.Nxe5, black can respond with 3...Bxf2+, a counter-attack that targets the white king¹. This move forces the white king to capture the bishop on f2 (4.Kxf2), leaving the king exposed and potentially vulnerable to further attacks¹.
However, white has options to handle this situation. One way is to play 3.Nc3 instead of 3.Nxe5 if they don't want to take the pawn¹. This move protects the pawn on e4, so if black attacks the pawn and plays Qh4, the pawn on e4 is protected¹.
Another way to prevent this is to keep the knight on f3 to defend the h4 square against the queen, or advancing the g-pawn to g3 (with the intention of a fianchetto)¹.
It's important to note that chess is a game of strategy and every move has potential consequences. The move 3.Nxe5 can lead to interesting and complex positions, and it's up to the player's judgment to decide whether this move aligns with their overall game strategy.
1.e4 e5 2.Nf3 Bc5 3.Nxe5
# Vienna Game, Omaha Gambit
## 3. f4! - Omaha Gambit

The Omaha Gambit is a chess opening that arises from the Vienna Game after the moves 1.e4 e5 2.Nc3 d6 3.f4!. This move is aggressive and aims to control the center of the board by attacking Black's pawn on e5. It is also known as the Breyer Variation.
The idea behind this move is to gain space and put pressure on Black's position. However, it does come with some risks. If Black plays accurately, they can gain an advantage by exploiting the weaknesses in White's position. For example, Black can play 3...exf4 to capture White's pawn on f4 and gain a material advantage.
The Omaha Gambit is not a popular choice at the highest levels of chess, but it can be a fun and interesting option to try out in casual games.
1. e4 e5 2. Nc3 d6 3. f4!
# Open Game

A very dubious Gambit. This has never been played in serious games, and is just a way to look silly.
# Busch-Gass Gambit
### 2...Bc5?!

Black ignores the attack on their e-pawn immediately goes on the offensive.
The move is considered unsound, however it often results in sharp play and thus may serve as a good surprise opening for Black.
The best way for White to continue is with Nxe5 accepting the gambit. Still, they must play carefully as this position can quickly transpose into dangerous gambits like the Stafford or Traxler.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
1. e4 e5 2. Nf3 Bc5
| 3 | 4 | 5 | 6 |
| Nxe5 Nc6 | Nxc6 dxc6 | c3 Nf6 | d4 Bb6 | +/- |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* Short-Corbin
* Nunn's Chess Openings. 1999. John Nunn (Editor), Graham Burgess, John Emms, Joe Gallagher. ISBN 1-8574-4221-0.
* Kasparov, Garry, & Keene, Raymond 1989 Batsford chess openings 2. ISBN 0-8050-3409-9.
# Vienna Game

Black's move is a mistake. White should now play 4. e5, forcing Ng8 (4...Qe7 solves nothing because of 5. Qe2).

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
1. e4 e5 2. Nc3 Nf6 3. f4 exf4
| 4 |
| e5 - | +/- |
When contributing to this Wikibook, please follow the Conventions for organization.
# Vienna Game

In the Vienna Game, after the moves 1.e4 e5 2.Nc3, Black has several options to choose from. One of them is 2...d6. This move is similar to the Philidor Defense if White developed the other knight. However, against the Vienna Game, it is simply not good. Part of this is simply that the next opening moves are easy for White - take the full center with 3.d4.
To elaborate further, 2...d6 is a passive move that does not challenge White's control of the center. It also blocks the f8-bishop, which is an important piece in many openings. This move can be useful in some situations, but it is generally not considered a good choice against the Vienna Game.
1. e4 e5 2. Nc3 d6
# Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Bc5/3. Nxe5/3...Bxf2
## 3...Bxf2+

In the sequence 1.e4 e5 2.Nf3 Bc5 3.Nxe5, the move 3...Bxf2+ is a counter-attack by black that targets the white king¹.
If white responds with 4.Kxf2, the king is forced to capture the bishop on f2, leaving the king exposed and potentially vulnerable to further attacks¹. However, white can handle this situation. For example, white can play g3 to defend against a potential Qh4+ check by black, if black decides to play Nf6 instead of an instant Qh4+¹.
If white decides to play 4.Ke2 instead of 4.Kxf2, it's considered a worse move because it prevents castling to protect the king, endangers the king, ignores development and the center, and blocks the queen and bishop, which are the two pieces that are free after 1. e4.
Remember, chess is a game of strategy and every move has potential consequences. It's up to the player's judgment to decide whether a move aligns with their overall game strategy.
1.e4 e5 2.Nf3 Bc5 3.Nxe5 Bxf2+
# Vienna Game, Würzburger Trap

White must block the check with 6. g3. Black can then take advantage of White's pinned h-pawn and play 6...Nxg3. The next moves are almost forced: 7. Nf3 Qh5 8. Nxd5.
If Black takes the rook with 8...Nxh1, they effectively trade rooks after 9. Nxc7+ Kd1 10. Nxa8 and the game is equal. Note that 8...Na6?? to prevent 9. Nxc7+ loses a piece after 9. Nf4 Qh6 10. Ne2.
Alternatively, Black may play 8...Bg4, preparing a battery against White's Queen.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
1. e4 e5 2. Nc3 Nf6 3. f4 d5 4. fxe5 Nxe4 5. d3 Qh4+
| 6 | 7 | 8 | 9 | 10 |
| g3 Nxg3 | Nf3 Qh5 | Nxd5 Nxh1 | Nxc7+ Kd8 | Nxa8 | = |
| g3 Nxg3 | Nf3 Qh5 | Nxd5 Bg4 | | | = |
When contributing to this Wikibook, please follow the Conventions for organization.
# Alapin's Opening
## 2. Ne2!?

An uncommon move that initially blocks White's bishop on f1, the idea however is often to play f4 a sort of King's Gambit but without the idea of giving up the f-pawn. Play could transpose into a Scotch Game if Black replies 2...Nc6
1. e4 e5 2. Ne2!?
   * 2...Nc6 3. d4 exd4 4. Nxd4 Scotch Game
   * 2...Nf6 3. f4 Nxe4 4. d3 Nc5 5. fxe5 d5 6. d4 Ne4=
When contributing to this Wikibook, please follow the Conventions for organization.
# C Sharp Programming/Keywords/sizeof

The sizeof keyword returns how many bytes an object requires to be stored.
An example usage:
C# Keywords :
| abstract | as | base | bool | break |
| byte | case | catch | char | checked |
| class | const | continue | decimal | default |
| delegate | do | double | else | enum |
| event | explicit | extern | false | finally |
| fixed | float | for | foreach | goto |
| if | implicit | in | int | interface |
| internal | is | lock | long | namespace |
| new | null | object | operator | out |
| override | params | private | protected | public |
| readonly | ref | return | sbyte | sealed |
| short | sizeof | stackalloc | static | string |
| struct | switch | this | throw | true |
| try | typeof | uint | ulong | unchecked |
| unsafe | ushort | using | var | virtual |
| void | volatile | while |
Special C# Identifiers (Contextual Keywords) :
| add | alias | async | await | dynamic |
| get | global | nameof | partial | remove |
| set | value | when | where | yield |
Contextual Keywords (Used in Queries) :
| ascending | by | descending | equals | from |
| group | in | into | join | let |
| on | orderby | select | where |
# C Sharp Programming/Keywords/true

The true keyword is a Boolean constant value. Therefore
would create an infinite loop.
C# Keywords :
| abstract | as | base | bool | break |
| byte | case | catch | char | checked |
| class | const | continue | decimal | default |
| delegate | do | double | else | enum |
| event | explicit | extern | false | finally |
| fixed | float | for | foreach | goto |
| if | implicit | in | int | interface |
| internal | is | lock | long | namespace |
| new | null | object | operator | out |
| override | params | private | protected | public |
| readonly | ref | return | sbyte | sealed |
| short | sizeof | stackalloc | static | string |
| struct | switch | this | throw | true |
| try | typeof | uint | ulong | unchecked |
| unsafe | ushort | using | var | virtual |
| void | volatile | while |
Special C# Identifiers (Contextual Keywords) :
| add | alias | async | await | dynamic |
| get | global | nameof | partial | remove |
| set | value | when | where | yield |
Contextual Keywords (Used in Queries) :
| ascending | by | descending | equals | from |
| group | in | into | join | let |
| on | orderby | select | where |
# C Sharp Programming/Keywords/string

The string keyword is used in field, method, property, and variable declarations and in cast and typeof operations as an alias for System.String. That is, it indicates an immutable sequence of characters.
C# Keywords :
| abstract | as | base | bool | break |
| byte | case | catch | char | checked |
| class | const | continue | decimal | default |
| delegate | do | double | else | enum |
| event | explicit | extern | false | finally |
| fixed | float | for | foreach | goto |
| if | implicit | in | int | interface |
| internal | is | lock | long | namespace |
| new | null | object | operator | out |
| override | params | private | protected | public |
| readonly | ref | return | sbyte | sealed |
| short | sizeof | stackalloc | static | string |
| struct | switch | this | throw | true |
| try | typeof | uint | ulong | unchecked |
| unsafe | ushort | using | var | virtual |
| void | volatile | while |
Special C# Identifiers (Contextual Keywords) :
| add | alias | async | await | dynamic |
| get | global | nameof | partial | remove |
| set | value | when | where | yield |
Contextual Keywords (Used in Queries) :
| ascending | by | descending | equals | from |
| group | in | into | join | let |
| on | orderby | select | where |
# C Sharp Programming/Keywords/struct

The struct keyword declares a structure, i.e. a value type that functions as a light-weight class.
C# Keywords :
| abstract | as | base | bool | break |
| byte | case | catch | char | checked |
| class | const | continue | decimal | default |
| delegate | do | double | else | enum |
| event | explicit | extern | false | finally |
| fixed | float | for | foreach | goto |
| if | implicit | in | int | interface |
| internal | is | lock | long | namespace |
| new | null | object | operator | out |
| override | params | private | protected | public |
| readonly | ref | return | sbyte | sealed |
| short | sizeof | stackalloc | static | string |
| struct | switch | this | throw | true |
| try | typeof | uint | ulong | unchecked |
| unsafe | ushort | using | var | virtual |
| void | volatile | while |
Special C# Identifiers (Contextual Keywords) :
| add | alias | async | await | dynamic |
| get | global | nameof | partial | remove |
| set | value | when | where | yield |
Contextual Keywords (Used in Queries) :
| ascending | by | descending | equals | from |
| group | in | into | join | let |
| on | orderby | select | where |