Re: [sage-devel] Query about SageMath for GSOC

2016-03-12 Thread Amritpal Singh
On Sat, Mar 12, 2016 at 3:24 PM, Johan S. R. Nielsen
 wrote:
> See the following list of suggested projects that a dev is ready to
> mentor:
>
> https://wiki.sagemath.org/GSoC/2016
>
> I'm on the project "Rank-metric codes" which has already received lots
> of attention from prospective students.

Thanks for the reply.

-- 
Amritpal Singh
http://www.amritpals.com/
https://github.com/amrit3701

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Query about SageMath for GSOC

2016-03-12 Thread Johan S . R . Nielsen
> Can you tell me some top priority projects of Sage for GSoC in which
> you can guide me?

See the following list of suggested projects that a dev is ready to
mentor:

https://wiki.sagemath.org/GSoC/2016

I'm on the project "Rank-metric codes" which has already received lots
of attention from prospective students.

Best,
Johan

Amritpal Singh writes:

> On Thu, Mar 10, 2016 at 6:09 PM, Johan S. R. Nielsen
>  wrote:
>> Sorry, apart from answering the odd email on this list, I'm not going to
>> guide such a project. I'm not particularly interested in the
>> "print_computation"-idea, and for the other idea on certificates, I
>> simply don't know enough about certificated algorithms to be of
>> significant help there. It's great that you're motivated about
>> contributing to Sage though!
>
> Can you tell me some top priority projects of Sage for GSoC in which
> you can guide me?
>
> -- 
> Amritpal Singh
> http://www.amritpals.com/
> https://github.com/amrit3701


-- 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Query about SageMath for GSOC

2016-03-11 Thread Amritpal Singh
On Thu, Mar 10, 2016 at 6:09 PM, Johan S. R. Nielsen
 wrote:
> Sorry, apart from answering the odd email on this list, I'm not going to
> guide such a project. I'm not particularly interested in the
> "print_computation"-idea, and for the other idea on certificates, I
> simply don't know enough about certificated algorithms to be of
> significant help there. It's great that you're motivated about
> contributing to Sage though!

Can you tell me some top priority projects of Sage for GSoC in which
you can guide me?

-- 
Amritpal Singh
http://www.amritpals.com/
https://github.com/amrit3701

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Query about SageMath for GSOC

2016-03-10 Thread Johan S . R . Nielsen
Hi Amritpal,

> If we can make a function of "computation of expressions" then we have a 
> certificate or proof that how Sage solve the particular equation. If this 
> thing is physically (internally) happening with Sage then, why can't we do 
> it?

Just giving a transcript of all elementary computations done when
calling some function f does not constitute a good certificate of the
correctness of the output of f: to verify it, the user would have to
verify every single step, and this would be as computationally expensive
as doing the computation himself. "Certificates" are supposed to be
small and easy to verify. See e.g. this paper on certificates for linear
algebra computations, such as the rank:

http://www.math.ncsu.edu/~kaltofen/bibliography/14/DuKa14.pdf


> Not only asking for GSOC, but can you guide me regarding this. Because I'm 
> willing to implement this thing in Sage. If we are able to implement this 
> in Sage then Sage will go to a next level which can't be imagined by 
> anyone. Also, you cleared all my doubts in a single email. Thank you for 
> that.  

Sorry, apart from answering the odd email on this list, I'm not going to
guide such a project. I'm not particularly interested in the
"print_computation"-idea, and for the other idea on certificates, I
simply don't know enough about certificated algorithms to be of
significant help there. It's great that you're motivated about
contributing to Sage though!

Best,
Johan



Amritpal Singh writes:

> On Wednesday, March 9, 2016 at 2:24:22 PM UTC+5:30, Johan S. R. Nielsen 
> wrote:
>> Hi Amritpal,
> 
>> A related, and mathematically quite important feature, is that of
>> "certificates": that a function returns together with its output a
>> certificate, a kind of proof, that output is really correct. For
>> instance, say I call M.rank() on a matrix M. How do I know that the
>> output 5 is correct? It would be nice to have a proof that I could
>> check, possibly in a probabilistic way, and preferably much faster than
>> the rank computation itself, to be certain that 5 is indeed the rank of
>> M. Making fast algorithms that also output certificates is an active
>> area of research and would be a cool addition to Sage. (I wouldn't be
>> able to mentor such a project though: I don't know much about
>> certificates, and I will likely be mentoring another project).
>
> Thanks for the reply and guidance.
> You explained it very well that how this thing can be implemented with 
> Sage. According to you, we can make a separate function i.e. 
> print_computation which will take input in the form of string and print all 
> its occurrences which can be processed for solving the equation. It is a 
> good idea that it's very difficult to hack all of the Sage so we can create 
> different functions which deal with computation of expression.
>
> If we can make a function of "computation of expressions" then we have a 
> certificate or proof that how Sage solve the particular equation. If this 
> thing is physically (internally) happening with Sage then, why can't we do 
> it?
>
> Not only asking for GSOC, but can you guide me regarding this. Because I'm 
> willing to implement this thing in Sage. If we are able to implement this 
> in Sage then Sage will go to a next level which can't be imagined by 
> anyone. Also, you cleared all my doubts in a single email. Thank you for 
> that.  
>
>
> -- 
> Amritpal Singh
> http://www.amritpals.com/
> https://github.com/amrit3701


-- 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Query about SageMath for GSOC

2016-03-10 Thread Amritpal Singh

On Wednesday, March 9, 2016 at 2:24:22 PM UTC+5:30, Johan S. R. Nielsen 
wrote:
> Hi Amritpal,

> A related, and mathematically quite important feature, is that of
> "certificates": that a function returns together with its output a
> certificate, a kind of proof, that output is really correct. For
> instance, say I call M.rank() on a matrix M. How do I know that the
> output 5 is correct? It would be nice to have a proof that I could
> check, possibly in a probabilistic way, and preferably much faster than
> the rank computation itself, to be certain that 5 is indeed the rank of
> M. Making fast algorithms that also output certificates is an active
> area of research and would be a cool addition to Sage. (I wouldn't be
> able to mentor such a project though: I don't know much about
> certificates, and I will likely be mentoring another project).

Thanks for the reply and guidance.
You explained it very well that how this thing can be implemented with 
Sage. According to you, we can make a separate function i.e. 
print_computation which will take input in the form of string and print all 
its occurrences which can be processed for solving the equation. It is a 
good idea that it's very difficult to hack all of the Sage so we can create 
different functions which deal with computation of expression.

If we can make a function of "computation of expressions" then we have a 
certificate or proof that how Sage solve the particular equation. If this 
thing is physically (internally) happening with Sage then, why can't we do 
it?

Not only asking for GSOC, but can you guide me regarding this. Because I'm 
willing to implement this thing in Sage. If we are able to implement this 
in Sage then Sage will go to a next level which can't be imagined by 
anyone. Also, you cleared all my doubts in a single email. Thank you for 
that.  


-- 
Amritpal Singh
http://www.amritpals.com/
https://github.com/amrit3701

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Query about SageMath for GSOC

2016-03-09 Thread Johan S . R . Nielsen
> For example: We have an equation (2+3*(8/2)) and when I solve this
> equation in SageMath it gives the exact answer i.e 14. However, it's
> really interesting to imagine if Sage prints all the steps that how
> they solve the above equation to find its answer like first it print
> this (2+3*4) by solving inner bracket and then it print (2+12) by
> multiplying 3 and 4 and at least it prints the last answer i.e 14.
> This can be done by using BODMAS rule. If by some algorithm or
> logic Sage prints every step of BODMAS operation then Sage have the 
> capability to prints
> all the steps that how they solve the particular equation.

Hi Amritpal,

It sounds to me like you mean "computation of expressions" and not
"solving equations". The difference is that "solving an equation" is
e.g. finding x under the requirement that
  x^2 - 2*x + 1 = 0 ,
i.e. something that contains at least one unknown x. For solving the
above equation in x, one *could* write something like

  x^2 - 2*x + 1 = 0   <=>
  (x-1)^2 = 0 <=>
  x-1 = 0

but more likely, the backend system will just apply the closed formula
for solving a second-degree equation, which would give the somewhat less
enlightening derivation

  x^2 - 2*x + 1 = 0   =>
  x = -(-2)/(2*1) +- sqrt((-2)^2 - 4 * 1 * 1)/(2*1) <=>
  x = 1

In other words, there's two major problems with asking a system like
Sage to write out the derivation in solving an equation:

1) A derivation useful for a computer is often not the most readable or
useful for a human.

2) Most non-obvious computations will be done using complicated
algorithms - not even formulas - whose intermediate steps would not hold
much sense for a human to read.

If we restrict ourselves to "computation of expressions" like what
you're actually writing about, then you seem to basically suggest:

- writing out the BNF form of a computation tree, e.g. (2+3*8/2) could
be written

  +
2 *
3/
8 2

- The expression should now be computed by simplifying nodes which have
only leaves as children. In the above there is only one choice, namely
the "/".

- After each such simplification, print the new expression (flattening
  the updated BNF back to a string, with the necessary parentheses added).


Since Sage uses various backends for the actual computations, and
simplifies in many different locations, it won't be easy to modify Sage
itself to do this everywhere. I also don't think that would be a
particularly sensible option for Sage.

However, it could be achieved, I think, by working on the level of
strings:

sage: print_computation("2+3*8/2")
2+3*8/2
2+3*4
2+12
14

The print_computation function thus takes a *string*, and it has
complete control over when the computations should take place. The
print_computation function could be implemented by scanning over the
string, emulating (or using?) the Python parser, and constructing the
BNF expression tree. The print_computation would then itself carry out
the computation step-wise and printing every time, instead of hacking
into the rest of Sage.

Note that this should be extendable to also allow more complicated Sage
objects to be printed:

sage: M = matrix(ZZ, [ 1, 2, 3, 4])
sage: print_computation('(3 * M) * M')
 [1 2]  [1 2]
(3 * [3 4] ) *  [3 4]

[3  6] * [1 2]
[9 12]   [3 4]

[21 30]
[45 66]

(it could probably be typeset better, though)

However, I'm not convinced such a functionality is really super-cool and
important to have in Sage? As Ralf pointed out, at this level, you could
achieve it manually without too much trouble, so why should Sage offer
the functionality internally -- how often will it be used?

A related, and mathematically quite important feature, is that of
"certificates": that a function returns together with its output a
certificate, a kind of proof, that output is really correct. For
instance, say I call M.rank() on a matrix M. How do I know that the
output 5 is correct? It would be nice to have a proof that I could
check, possibly in a probabilistic way, and preferably much faster than
the rank computation itself, to be certain that 5 is indeed the rank of
M. Making fast algorithms that also output certificates is an active
area of research and would be a cool addition to Sage. (I wouldn't be
able to mentor such a project though: I don't know much about
certificates, and I will likely be mentoring another project).

Best,
Johan

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Query about SageMath for GSOC

2016-03-06 Thread Amritpal Singh
Hello developers,

I'm an enthusiast user of SageMath, using sage for purpose doesn't satisfy 
me, so now I want to contribute in coming GSOC 2016.
As you, all know that Sage have no functionality to prints all the steps 
that how this particular equation is solved. It gives
the exact solution of a particular equation.
For example: We have an equation (2+3*(8/2)) and when I solve this
equation in SageMath it gives the exact answer i.e 14. However, it's
really interesting to imagine if Sage prints all the steps that how
they solve the above equation to find its answer like first it print
this (2+3*4) by solving inner bracket and then it print (2+12) by
multiplying 3 and 4 and at least it prints the last answer i.e 14.
This can be done by using BODMAS rule. If by some algorithm or
logic Sage prints every step of BODMAS operation then Sage have the 
capability to prints
all the steps that how they solve the particular equation.

Here is the given below links in which I use SageMath in LaTeX.
1.) https://github.com/GreatDevelopers/DesignAids
The above code creates a pdf file like
https://drive.google.com/file/d/0B9rE-y43R1Z8OWJLbTg3WFJIUHc/view?usp=sharing

2.) https://github.com/GreatDevelopers/SageLaTeX/tree/master/shm

If any mentor of SageMath can guide me then I want to contribute in
it. As I don't know that this thing is physically happening or not. If
yes then I am the lucky guy and who wants to contribute in some open
source projects.

--
Amritpal Singh
Guru Nanak Dev Engineering College, India
http://www.amritpals.com/
https://github.com/amrit3701

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.