Alec Mihailovs

Dr. Aleksandrs Mihailovs

4495 Reputation

21 Badges

20 years, 340 days
Mihailovs, Inc.
Owner, President, and CEO
Tyngsboro, Massachusetts, United States

Social Networks and Content at Maplesoft.com

Maple Application Center

I received my Ph.D. from the University of Pennsylvania in 1998 and I have been teaching since then at SUNY Oneonta for 1 year, at Shepherd University for 5 years, at Tennessee Tech for 2 years, at Lane College for 1 year, and this year I taught at the University of Massachusetts Lowell. My research interests include Representation Theory and Combinatorics.

MaplePrimes Activity


These are replies submitted by Alec Mihailovs

You get the original list mod 33. If you add 99 (which is 0 mod 33), you get the original list. But that might be different in other examples, including letters a, b, and spaces.

Alec

 

Check Sage.

Alec

If there was a voting, I would vote for 25 (the default value). There is no much of a difference between that and 20 (which also seems like a good choice), but that would be consistent with the command-line setting.

Alec

If there was a voting, I would vote for 25 (the default value). There is no much of a difference between that and 20 (which also seems like a good choice), but that would be consistent with the command-line setting.

Alec

Now, I don't want to rush or anything, but March (and the 1st quarter) ended last week...

Alec

Originally u had 2 terms and length 17.

  1. After the 1st step - 8 terms and length 131;
  2. After the 2nd step - 105 terms and length 3390;
  3. After the 3rd step - 3360 terms and length 273198.

With such a rate, the number of terms and the length after the 10th step will be astronomical (or, as Richard Feynman called such numbers, financial :)

Alec

 

Originally u had 2 terms and length 17.

  1. After the 1st step - 8 terms and length 131;
  2. After the 2nd step - 105 terms and length 3390;
  3. After the 3rd step - 3360 terms and length 273198.

With such a rate, the number of terms and the length after the 10th step will be astronomical (or, as Richard Feynman called such numbers, financial :)

Alec

 

That's a nice idea! And it works.

Alec

That's a nice idea! And it works.

Alec

That depends on what you mean by a spreadsheet. If it's in a file, it can be imported to Maple as a Matrix. After that, X and Y can be defined as the rows or columns of that matrix and entered in the ScatterPlot command by their names, X and Y.

If you had an example, someone would show how to do that in that example. Without an example, it's not easy to understand the problem you are having.

If you meant the Maple's spreadsheet, it can't have more than 100 rows, and assuming that 100 rows in columns A and B of the spreadsheet named s are filled with data, the Matrix can be extracted as

Spread:-SetSelection(s,1,1,100,2);
M:=Spread:-GetValuesMatrix(s);
X:=M[..,1];
Y:=M[..,2];

Alec

That depends on what you mean by a spreadsheet. If it's in a file, it can be imported to Maple as a Matrix. After that, X and Y can be defined as the rows or columns of that matrix and entered in the ScatterPlot command by their names, X and Y.

If you had an example, someone would show how to do that in that example. Without an example, it's not easy to understand the problem you are having.

If you meant the Maple's spreadsheet, it can't have more than 100 rows, and assuming that 100 rows in columns A and B of the spreadsheet named s are filled with data, the Matrix can be extracted as

Spread:-SetSelection(s,1,1,100,2);
M:=Spread:-GetValuesMatrix(s);
X:=M[..,1];
Y:=M[..,2];

Alec

For Windows, AutoHotkey would do the trick.

Alec

Q.1. It is easier to convert a string,

convert("abc",bytes);

                             [97, 98, 99]

A list of characters can be converted using the following procedure,

f:=L->map(op@convert,L,bytes):

Another solution:

f:=curry(map,StringTools:-Ord);

For example,

L:=["a","b","c"]:
f(L);

                             [97, 98, 99]

Q.2.i)

F:=(a,b,L)->map(x->x&^b mod a,L):

Q2. ii)

L:=[$0..32];

  L := [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,

        18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]

L1:=F(33,3,L);

  L1 := [0, 1, 8, 27, 31, 26, 18, 13, 17, 3, 10, 11, 12, 19, 5, 9, 4,

        29, 24, 28, 14, 21, 22, 23, 30, 16, 20, 15, 7, 2, 6, 25, 32]

F(33,3,L1);

  [0, 1, 17, 15, 25, 20, 24, 19, 29, 27, 10, 11, 12, 28, 26, 3, 31, 2,

        30, 7, 5, 21, 22, 23, 6, 4, 14, 9, 13, 8, 18, 16, 32]

Nope. On the other hand,

F(33,7,L1);

  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,

        19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]

That matches the original list.

Alec

Q.1. It is easier to convert a string,

convert("abc",bytes);

                             [97, 98, 99]

A list of characters can be converted using the following procedure,

f:=L->map(op@convert,L,bytes):

Another solution:

f:=curry(map,StringTools:-Ord);

For example,

L:=["a","b","c"]:
f(L);

                             [97, 98, 99]

Q.2.i)

F:=(a,b,L)->map(x->x&^b mod a,L):

Q2. ii)

L:=[$0..32];

  L := [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,

        18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]

L1:=F(33,3,L);

  L1 := [0, 1, 8, 27, 31, 26, 18, 13, 17, 3, 10, 11, 12, 19, 5, 9, 4,

        29, 24, 28, 14, 21, 22, 23, 30, 16, 20, 15, 7, 2, 6, 25, 32]

F(33,3,L1);

  [0, 1, 17, 15, 25, 20, 24, 19, 29, 27, 10, 11, 12, 28, 26, 3, 31, 2,

        30, 7, 5, 21, 22, 23, 6, 4, 14, 9, 13, 8, 18, 16, 32]

Nope. On the other hand,

F(33,7,L1);

  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,

        19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]

That matches the original list.

Alec

close(filename);
readbytes(filename,18);

  [70, 105, 108, 101, 84, 111, 111, 108, 115, 32, 101, 120, 97, 109,

        112, 108, 101, 13]

Alec

First 61 62 63 64 65 66 67 Last Page 63 of 180