Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Another Combinatorica loading problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg50103] Re: Another Combinatorica loading problem
  • From: "Steven Shippee" <slshippee at comcast.net>
  • Date: Sun, 15 Aug 2004 03:14:30 -0400 (EDT)
  • References: <cfkaj9$fa0$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Although a novice at Mathematica, I work with computers, and deductively it
looks like your Combinatorica package does not have to show in your path,
for example, on my machine with 'default' installations [Version Number:
5.0.1.0; Platform: Windows], we find:

Default Packages:

In[1]:=$Packages
Out[1]={"Graphics`Arrow`",   "Utilities`FilterOptions`",
"Graphics`Common`GraphicsCommon`", "Graphics`Legend`",  "Graphics`Colors`",
"ATM`",
  "Global`", "System`"}

Load Combinatorica    << DiscreteMath`Combinatorica`

Resulting in: In[3]:=$Packages
Out[3]={"Statistics`Common`DistributionsCommon`",  "DiscreteMath`Tree`",
"Statistics`DataManipulation`", "Statistics`DescriptiveStatistics`",
"Statistics`DiscreteDistributions`", "DiscreteMath`CombinatorialFunctions`",
"DiscreteMath`Combinatorica`", "Graphics`Arrow`",
  "Utilities`FilterOptions`",   "Graphics`Common`GraphicsCommon`",
"Graphics`Legend`",   "Graphics`Colors`", "ATM`",  "Global`", "System`"}

Showing the package loaded OK, and path shows it [Combinatoria] is not
required to show in the path, I assume?

In[4]:=$Path
Out[4]={"C:\\Program Files\\Wolfram
Research\\Mathematica\\5.0\\AddOns\\JLink",
"C:\\Program Files\\Wolfram Research\\Mathematica\\5.0\\AddOns\\NETLink",
"C:\\Documents and Settings\\shis235\\Application
Data\\Mathematica\\Kernel",
 "C:\\Documents and Settings\\shis235\\Application
Data\\Mathematica\\Autoload",
 "C:\\Documents and Settings\\shis235\\Application
Data\\Mathematica\\Applications",
"C:\\Documents and Settings\\All Users\\Application
Data\\Mathematica\\Kernel",
"C:\\Documents and Settings\\All Users\\Application
Data\\Mathematica\\Autoload",
 "C:\\Documents and Settings\\All Users\\Application
Data\\Mathematica\\Applications", ".",
"C:\\Documents and Settings\\shis235",
"C:\\Program Files\\Wolfram
Research\\Mathematica\\5.0\\AddOns\\StandardPackages",
"C:\\Program Filles\\Wolfram
Research\\Mathematica\\5.0\\AddOns\\StandardPackages\\StartUp",
"C:\\Program Files\\Wolfram Research\\Mathematica\\5.0\\AddOns\\Autoload",
"C:\\Program Files\\Wolfram
Research\\Mathematica\\5.0\\AddOns\\Applications",
"C:\\Program Files\\Wolfram
Research\\Mathematica\\5.0\\AddOns\\ExtraPackages",
"C:\\Program Files\\Wolfram
Research\\Mathematica\\5.0\\SystemFiles\\Graphics\\Packages",
"C:\\Program Files\\Wolfram
Research\\Mathematica\\5.0\\Configuration\\Kernel"}

In[19]:=And permutations works just fine?
Permutations[{a,b,c,d}]
Out[19]=
{{a,b,c,d},{a,b,d,c},{a,c,b,d},{a,c,d,b},{a,d,b,c},{a,d,c,b},{b,a,c,d},{b,a,
d,
    c},{b,c,a,d},{b,c,d,a},{b,d,a,c},{b,d,c,a},{c,a,b,d},{c,a,d,b},{c,b,a,
    d},{c,b,d,a},{c,d,a,b},{c,d,b,a},{d,a,b,c},{d,a,c,b},{d,b,a,c},{d,b,c,
    a},{d,c,a,b},{d,c,b,a}}

> << DiscreteMath`Combinatorica`
> nor
> Needs["DiscreteMath`Combinatorica`"];
>
> apparently loads it because NthPermutation[100,{a,b,c,d,e,f,g}] just
echoes NthPermutation.

I think if you do a
?Permutation

you will not find an "NthPermutation", and perhaps you need to revisit your
intial input/directions to mathematica?
Being a novice I find that if mathematica spits back what I asked it to do
verbatim, I have usually screwed up in my input, which then causes me to go
bug David Park and have him gently show me it is my input, not the
computer's lack of processing ability!!


Steven Shippee
slshippee at comcast.net


  • Prev by Date: Re: Re: Smallest enclosing circle and other model versions
  • Next by Date: Re: Can this integration be done?
  • Previous by thread: Re: Another Combinatorica loading problem
  • Next by thread: Re: Another Combinatorica loading problem