4.38 Tuesday, March 28, 2017

================================== 
Top new questions this week: 
==================================

================================== Top new questions this week: ==================================

[Faster derangements?] http://mathematica.stackexchange.com/questions/140794/faster-derangements

I wonder what is the fastest method to generate derangements?

Both the Combinatorica function and Martin Ender’s answer to Permutations of lists of fixed even numbers are based on filtering the ...

- asked by Mr.Wizard (22 votes), answered by jkuczm (21 votes)

—————————-

[Why Except is so slow as compared to equivalent RegularExpression?] http://mathematica.stackexchange.com/questions/140752/why-except-is-so-slow-as-compared-to-equivalent-regularexpression

When comparing performance of the solutions suggested for this question I discovered that StringExpression involving Except is two orders of magnitude slower for large strings as compared to ...

- asked by Alexey Popkov (18 votes), answered by Alexey Popkov (20 votes)

—————————-

[FrameTicks setting for "tick marks on all sides, but labels only on right and top"] http://mathematica.stackexchange.com/questions/140966/frameticks-setting-for-tick-marks-on-all-sides-but-labels-only-on-right-and-to

Short version: Is there a value for the FrameTicks option that retains the default tick marks on all sides, and puts tick labels only on the right and top sides?

I can imagine all manner of ...

- asked by kjo (15 votes), answered by Mr.Wizard (7 votes)

—————————-

[Quickly importing several thousands of jpg files?] http://mathematica.stackexchange.com/questions/140974/quickly-importing-several-thousands-of-jpg-files

I have several thousands of small .jpg files (30kb each) which I need to import into Mathematica. (I plan to use ImageDistance to investigate their differences.) I tried several ways to import these ...

- asked by Kagaratsch (14 votes), answered by Szabolcs (13 votes)

—————————-

[Select seems unusually slow] http://mathematica.stackexchange.com/questions/140861/select-seems-unusually-slow

I haven’t been doing nearly as much Mathematica as I really should for the past few months, and in order to get my head back in the game I’ve been using it to run roughshod over easy Project Euler ...

- asked by Pillsy (13 votes), answered by Bob Hanlon (10 votes)

—————————-

[Permutations of nested parentheses (Dyck words)] http://mathematica.stackexchange.com/questions/141127/permutations-of-nested-parentheses-dyck-words

How would I construct a function that outputs Dyck Words?

e.g. - there are 14 words in \(\mathcal {D}_{8}\):

`[[[[]]]], [[[][]]], [[[]][]], [[][[]]], [[[]]][], [[][][]], [][[[]]], 
 [[][]][], [[]][[]],  ...

- asked by martin (11 votes), answered by Mr.Wizard (13 votes)

—————————-

[Bug: Library functions from older versions of Mathematica may crash in Mathematica 11.1 and conversely] http://mathematica.stackexchange.com/questions/140758/bug-library-functions-from-older-versions-of-mathematica-may-crash-in-mathemati

The following is a confirmed bug [CASE:3846875] that turned up in the prerelease 11.1.0 and is not solved in the official release.

This is a small example. Execute the following commands in ...

- asked by Fred Simons (11 votes)

================================== Greatest hits from previous weeks: ==================================

[How to make a Spherical Cow?] http://mathematica.stackexchange.com/questions/125043/how-to-make-a-spherical-cow

Being a theoretical physicist, I always have a great respect for Spherical Cow. So I thought about making one myself. I am not sure how can I create (something considered to be the simplest!) this ...

- asked by Sumit (60 votes), answered by andre (69 votes)

—————————-

[How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc] http://mathematica.stackexchange.com/questions/66273/how-to-tell-mathematica-that-certain-variables-are-real-imaginary-integer-value

I’m trying to expedite some quantum mechanical calculations (expectation values etc.) by running them through Mathematica. When I say, for example,

u[x_] := Sqrt[2/L] * Sin[Pi * n * x / L]

and then ...

- asked by Matthew Brunetti (13 votes), answered by SquareOne (10 votes)

================================== Can you answer these? ==================================

[Why does LatticeReduce require integral or at least rational inputs?] http://mathematica.stackexchange.com/questions/141002/why-does-latticereduce-require-integral-or-at-least-rational-inputs

The function LatticeReduce in Mathematica implements the LLL algorithm. It requires the lattice basis to be described as integral or at least rational numbers.

Why so?

The LLL algorithm itself is ...

- asked by wdlang (3 votes)

—————————-

[Textual progress in console?] http://mathematica.stackexchange.com/questions/140675/textual-progress-in-console

Is there any way to get a textual progress bar (e.g. like the progressbar module in a python repl) when working in console mode?

Anything would be better than this:

- asked by user5601 (6 votes)

—————————-

[How to trigger an "ErrorBox behavior"?] http://mathematica.stackexchange.com/questions/140979/how-to-trigger-an-errorbox-behavior

Here’s an example of what I mean by an "ErrorBox behavior". In the front end, if one evaluates the expression

Graphics[Circle[], ImageSize -> Tiny, PlotRange -> {All}]

(which includes the ...

- asked by kjo (7 votes)