MathGroup Archive 2001

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

Search the Archive

Re: redundant brackets

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27018] Re: redundant brackets
  • From: "Paul Lutus" <nospam at nosite.com>
  • Date: Tue, 30 Jan 2001 23:22:34 -0500 (EST)
  • References: <9560t8$51@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"Joerg Reinnarth" <reinnart at iskp.uni-bonn.de> wrote in message
news:9560t8$51 at smc.vnet.net...
> Dear Groups,
>
> I produce a table in a function.
>
> The entries of the table contain redundant brackets.
>
> For example  { {0}, {{{{{{14}}}}}, {{{3}}} }.
>
> I want to get these brackets away, but using Simplify or FullSimplify does
not help.

That is because "brackets" (actually braces in this example) are never
redundant. They are always interpreted as indicating structure.

If they really have no meaning, why not rewrite the original function so it
doesn't create them in the first place? That is the easiest and most obvious
solution.

If the desired output should be:

{ {0}, {14}, {3} }.

Then the generating function should be placing these values at the same
level in the list array. If it does not, it should be reexamined. Here is
why:

FullForm[{ {0}, {{{{{{14}}}}}}, {{{3}}} }]

List[List[0],List[List[List[List[List[List[14]]]]]],List[List[List[3]]]]

In other words, the braces in your example are not arbitrary, like nested
parentheses would be.

Also, your posted example has a typo -- one too few right braces.

--
Paul Lutus
www.arachnoid.com





  • Prev by Date: Re: mathematica crashes after 10 seconds of computation
  • Next by Date: Re: How can I creat a user coordinate system for my routine?
  • Previous by thread: Re: redundant brackets
  • Next by thread: modifiying the path variable