Math::Combination_out - version 0.05
====================================

INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install

SYNOPSIS

Math::Combination_out - Combinations without or with repetition

In this module was applied the approach for k-combinations without and with repetition in lexicographic order, 
presented in the ANSI-C code by Siegfried Koepf at:

http://www.aconnect.de/friends/editions/computer/combinatoricode_e.html

=head1 SYNOPSIS

EXAMPLE:

use Math::Combination_out;

{my @words = qw/a1 b2 c3 d4 e5 f6/; #array for combinatorics
my $k = 4; #length for combinatorics, use only integer!
my $opt = 1; #option: 1 - without repetition

push(@words, $k, $opt);

print Combinations(@words),"\n"}

{my @words = qw/a1 b2 c3/; #array for combinatorics

my $k = 3; #length for combinatorics, use only integer!
my $opt = 2; #option: 2 - with repetition

push(@words, $k, $opt);

print Combinations(@words),"\n";}

Result:

(Combinations without repetition):

(1) a1 b2 c3 d4
(2) a1 b2 c3 e5
(3) a1 b2 c3 f6
(4) a1 b2 d4 e5
(5) a1 b2 d4 f6
(6) a1 b2 e5 f6
(7) a1 c3 d4 e5
(8) a1 c3 d4 f6
(9) a1 c3 e5 f6
(10) a1 d4 e5 f6
(11) b2 c3 d4 e5
(12) b2 c3 d4 f6
(13) b2 c3 e5 f6
(14) b2 d4 e5 f6
(15) c3 d4 e5 f6

(Combinations with repetition):

(1) a1 a1 a1
(2) a1 a1 b2
(3) a1 a1 c3
(4) a1 b2 b2
(5) a1 b2 c3
(6) a1 c3 c3
(7) b2 b2 b2
(8) b2 b2 c3
(9) b2 c3 c3
(10) c3 c3 c3

COPYRIGHT AND LICENCE

Copyright (c) 2011-2012 Petar Kaleychev <petar.kaleychev@gmail.com>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
