Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add algorithm tag #66

Closed
kcrisman opened this issue Mar 15, 2015 · 10 comments
Closed

Add algorithm tag #66

kcrisman opened this issue Mar 15, 2015 · 10 comments

Comments

@kcrisman
Copy link
Contributor

Like fact, theorem, statement, etc. This is common enough in things like discrete math textbooks. (I didn't find it in the sample article, anyway.)

@rbeezer
Copy link
Collaborator

rbeezer commented Mar 15, 2015

And what goes into it? Only a pseudo-code chunk? Or is more like an example
where you might have some discussion in paragraphs and a program listing
(already implemented) and some run-time analysis and ....?

On 03/14/2015 07:17 PM, kcrisman wrote:

Like fact, theorem, statement, etc. This is common enough in things like
discrete math textbooks. (I didn't find it in the sample article, anyway.)


Reply to this email directly or view it on GitHub
#66.

@kcrisman
Copy link
Contributor Author

Well, it's like a theorem except it isn't a theorem, it's an algorithm. Could be pseudocode but maybe not. E.g. (though this was not the case I was thinking of)

  1. Initialize p=2
  2. Loop the following for each p < sqrt(n)
    1. Cross out all (remaining) multiples of p
    2. Set p = the next lowest uncrossed number

@kcrisman
Copy link
Contributor Author

(I should point out that an algorithm may have a proof that it has a certain big-Oh or whatever, or that it does in fact provide the desired outcome, but it doest have to, it could just be a set of steps. The example connected to it would be a separate example tag, just like when one would give an example of a proposition or theorem or fact or definition. Basically, I just couldn't think of what else in the list of theorem-like tags this could be and didn't want to hack in some bold-face and numbering.)

@kcrisman
Copy link
Contributor Author

(And I suppose there could be a program listing as part of it, though I myself would prefer to have that be a separate item which implements Algorithm 2.3.1.4.2.3.5b (or whatever).)

@rbeezer
Copy link
Collaborator

rbeezer commented Mar 15, 2015

I see. So in your example algorithm there could be a claim that the list only
has primes left at the conclusion. That claim might then have a proof
immediately following.

Should be very easy to add it to the list of theorem, corollary, lemma, fact,
etc. I'm going to let it percolate for a bit, but should be able to add it this
week.

Thanks for the suggestion and for not hacking up something. ;-)

Rob

On 03/14/2015 08:28 PM, kcrisman wrote:

(I should point out that an algorithm may have a proof that it has a certain
big-Oh or whatever, or that it does in fact provide the desired outcome, but it
doest have to, it could just be a set of steps. The example connected to it
would be a separate example tag, just like when one would give an example of a
proposition or theorem or fact or definition. Basically, I just couldn't think
of what else in the list of theorem-like tags this could be and didn't want to
hack in some bold-face and numbering.)


Reply to this email directly or view it on GitHub
#66 (comment).

@davidfarmer
Copy link
Contributor

There are LaTeX packages for marking up algorithms, and they are
not just theorems with "Theorem" replaced by "Algorithm".
Some support markup of fairly elaborate pseudocode.

Not sure how much of that you want to support.

On Sat, 14 Mar 2015, Rob Beezer wrote:

I see. So in your example algorithm there could be a claim that the list only
has primes left at the conclusion. That claim might then have a proof
immediately following.

Should be very easy to add it to the list of theorem, corollary, lemma, fact,
etc. I'm going to let it percolate for a bit, but should be able to add it this
week.

Thanks for the suggestion and for not hacking up something. ;-)

Rob

On 03/14/2015 08:28 PM, kcrisman wrote:

(I should point out that an algorithm may have a proof that it has a certain
big-Oh or whatever, or that it does in fact provide the desired outcome, but it
doest have to, it could just be a set of steps. The example connected to it
would be a separate example tag, just like when one would give an example of a
proposition or theorem or fact or definition. Basically, I just couldn't think
of what else in the list of theorem-like tags this could be and didn't want to
hack in some bold-face and numbering.)


Reply to this email directly or view it on GitHub
#66 (comment).


Reply to this email directly or view it on GitHub.[AAM6LCjw0I_KECQ0y0Emf-BHGixAR-K-ks5n1PyjgaJpZM4Du27s.gif]

@rbeezer
Copy link
Collaborator

rbeezer commented Mar 15, 2015

Right. I spent a long time once trying to figure this out. The LaTeX
descriptions render very nicely, but then how do you make them into HTML?
Unless I'm missing some third-party extension, I don't see that MathJax provides
the usual help. The syntax for the stats language "R" uses a backwards-arrow
for assignment (iirc) so that can be a poor-man's standin with the Google
"prettify" tool already built-in.

I think an "algorithm" still can be useful now, and then down the road better
quality stuff can go inside it. I've made an issue so that somebody might see
it as a useful project to add, along with a few similar but distinct comments.

#68

On 03/15/2015 06:48 AM, davidfarmer wrote:

There are LaTeX packages for marking up algorithms, and they are
not just theorems with "Theorem" replaced by "Algorithm".
Some support markup of fairly elaborate pseudocode.

Not sure how much of that you want to support.

On Sat, 14 Mar 2015, Rob Beezer wrote:

I see. So in your example algorithm there could be a claim that the list only
has primes left at the conclusion. That claim might then have a proof
immediately following.

Should be very easy to add it to the list of theorem, corollary, lemma, fact,
etc. I'm going to let it percolate for a bit, but should be able to add it this
week.

Thanks for the suggestion and for not hacking up something. ;-)

Rob

On 03/14/2015 08:28 PM, kcrisman wrote:

(I should point out that an algorithm may have a proof that it has a certain
big-Oh or whatever, or that it does in fact provide the desired outcome, but it
doest have to, it could just be a set of steps. The example connected to it
would be a separate example tag, just like when one would give an example of a
proposition or theorem or fact or definition. Basically, I just couldn't think
of what else in the list of theorem-like tags this could be and didn't want to
hack in some bold-face and numbering.)


Reply to this email directly or view it on GitHub
#66 (comment).


Reply to this email directly or view it on
GitHub.[AAM6LCjw0I_KECQ0y0Emf-BHGixAR-K-ks5n1PyjgaJpZM4Du27s.gif]


Reply to this email directly or view it on GitHub
#66 (comment).

@rbeezer
Copy link
Collaborator

rbeezer commented Mar 15, 2015

@rbeezer rbeezer closed this as completed Mar 15, 2015
@kcrisman
Copy link
Contributor Author

Wow. Thank you open source!

@kcrisman
Copy link
Contributor Author

I think you mean eb8b0d2 and 456e17c

rbeezer pushed a commit that referenced this issue Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants