COMBINATORICS 1.0 FOR DOS  -  DOCUMENTATION
----------------------------------------------

	-- FREEWARE --
	-- NO GUARANTEE --

1. Introduction / purpose
2. System requirements
3. Files of the product
4. Instructions to use
 4.1. Use in screen mode
 4.2. Use with parameters
5. Input values ; results
6. Explanation of the combinatoric expressions
7. Product information, licence and distribution
8. Contact information

--------------------------------------------------------

** 1. INTRODUCTION / PURPOSE

Combinatorics 1.0 is a DOS-based program for calculation
with combinatoric operations. It supports 5 functions:
combination, variation, permutation, variation with recurrence
of elements, permutation with recurrence of elements.


--------------------------------------------------------

** 2. SYSTEM REQUIREMENTS

This program has been developed and tried in MS-DOS 6.2.
It should function in other DOS versions (if not too
outdated). Hardware requirements are not fully known ;
it is supposed that it should run on any PC with MS-DOS,
maybe except on some obsolete ones.

It has been optimized for various screen modes.
For compiling this program, a library which does not need to
run on new types of processors Pentium has been
used, but when being tried it was running.

If any difficulty appears users are asked to report on it.

--------------------------------------------------------

** 3. FILES OF THE PRODUCT

COMBIN.EXE	: the program
README.TXT	: documentation
EXAMPLES.TXT	: examples of combinatoric functions

When distributing the product, all these files are to be included !

--------------------------------------------------------

** 4. INSTRUCTIONS TO USE

The program can be used either by simple running - in screen mode -
or with entering parameters in a command line.

 * 4.1. USE IN SCREEN MODE

To run just enter the name of the executable file:
combin.exe
Then it displays the menu and control bars.

To use the control bars:
  1) use the defined keys
or
  2) click on the bars.

     		CONTROLS
	       ----------
	Action:		Key:		Description:
       ---------       ------	       --------------
	Exit 		Alt+X		Exit the program
	Info		F1		Display product information
					in the output area
	Delete	     Delete or Escape	Clears the output area
	Save		F2		Saves the output area
					to an output file

OUTPUT AREA = the lines where the results of the operations are displayed.

OUTPUT FILE = the file where the outputs are (results) can be stored.
Its name is COMBIN.DAT and it is always stored in the same directory
as the program. This file appears after the first saving.
If the file does not exist or has been deleted, the program creates
a new one when saving. If the file exists, the results
(and other outputs, e.g. info) are appended to its end.
Note: the output area can always be stored,
even when it is empty or contains Info.

	MENU
       -------
The menu serves for selection of type of required operation
(combination, variation, permutation, variations with recurrence,
permutation with recurrence).
To select from the menu:
  1) use arrows to move and then press Enter or Space to select
or
  2) click on to move, then click on the required item to select.

       AREA
      ------
After selecting an item, request for entering parameters will appear.
Enter the values, in accordance with the conditions of acceptance of
values. Where two values are needed, you can move between them, using
arrows provided that at least the first value is already set.
You can delete digits, using Backspace, or the whole value, using Delete.
Pressing Escape, the action is cancelled.

Use of the keys Enter or Space:
1 value required (only in case of permutation) : 
	use one of these keys to get the result;
2 values required:
	- cursor on the 1st line : use one of these keys to move to
			     	   the 2nd line,
	- cursor on the 2nd line : use one of these keys to get the result.

During the action, the control commands / bars are inactive.


      MOUSE
     -------

This program supports a mouse.
It can be deactivated and reactivated by using : Alt+M .


 * 4.2. USE WITH PARAMETERS

Besides the use in screen mode, this program can be used with command-line
parameters for prompt output.

List of parameters:

  C    = combination(n,k)
  V    = variation(n,k)
  P    = permutation(n)
  VR    = variation(n,k) with recurrence of elements
  PR    = permutation(n) with recurrence of [r] elements

  I (or any other parameter) : Info
  L : get the list of possible parameters
  [no parameter] : run the program in screen mode
  NM :  run the program in screen mode - mouse off ;
	note: if this option is used, the mouse can't be reactivated
	within the program.

The parameters are not case-sensitive,
i.e. no difference: [parameter] or [PARAMETER].
The parameters can be preceded by '/', '-' or '=' .

--------------------------------------------------------

** 5. INPUT VALUES ; RESULTS

Acceptable input values:

Combination:  n>=0; k>=0; n>=k;
Variation:  n>0; k>=0; n>=k;
Permutation:  n>=0;
Variation with recurrence:  n>=0; k>=0;
Permutation with recurrence: n>=0; r>=0; n>=r

If any value is incorrect, an error message is displayed,
when using the program either in screen mode or with parameters.

Overflow is checked by the program in advance.
A run-time error caused by excessive values is not expected,
at least as was tried.

Higher results are displayed in a form with an exponent:
for example : 8.15915283247897734E+0047 .

--------------------------------------------------------

** 6. EXPLANATION OF THE COMBINATORIC EXPRESSIONS

Note: For examples find the file EXAMPLES.TXT

"!" = factorial ; 
examples:
3! = 1×2×3 = 6
6! = 1×2×3×4×5×6 = 720
note: 0! = 1

   COMBINATION
  -------------
values: n,k :
   = sum of groups consisting of k-number of elements in
	 a set of n-number of elements
where the order of elements is not considered ;
	each element in a group is unique, does not recur

Formula:
		n!
   C(n,k) = -----------
	     (n-k)!k!


   VARIATION
  -----------
values: n,k :
   = sum of groups consisting of k-number of elements in
	 a set of n-number of elements
where the order of elements is considered ;
	each element in a group is unique, does not recur

Formula:
		n!
   V(n,k) = -----------
	      (n-k)!


   PERMUTATION
  -------------
value: n :
   = sum of groups consisting of n-number of elements in
	 a set of n-number of elements
where the order of elements is considered ;
     each element in a group is unique, does not recur ;
= equivalent to operation of variation if n=k

Formula:
	
   P(n) = n!


   VARIATION WITH RECURRENCE
  ---------------------------
values: n,k :
   = sum of groups consisting of k-number of elements in
	 a set of n-number of elements
where the order of elements is considered ; 
	elements can recur in a group

Formula:		
	      k
   Vr(n,k) = n
		(k-power of n)


   PERMUTATION WITH RECURRENCE
  ---------------------------
values: n,r :
	= sum of groups consisting of n-number of elements in
	 a set of n-number of elements
where the order of elements is considered ;
     each element in a group is unique, does not recur ;
     elements in the total set (not in a group) can occur r-times,
     it means r-number of elements are identical

Formula:		
	      n!
   Pr(n,r) = ----
     	      r!


--------------------------------------------------------

** 7. PRODUCT INFORMATION, LICENCE AND DISTRIBUTION

This product is FREEWARE. It is allowed to be freely
distributed provided that ALL ITS FILES (listed in the section 3)
ARE INCLUDED AND UNMODIFIED.

DISCLAIMER:
THERE IS NO GUARANTEE AND
NO RESPONSIBILITY FOR THE USE OF THIS PROGRAM,
POSSIBLE MALFUNCTIONS OR EVEN DAMAGES.

Further distribution is encouraged.

--------------------------------------------------------

-- RETURN --