何かを書き留める何か

数学や読んだ本について書く何かです。最近は社会人として生き残りの術を学ぶ日々です。

2013-01-01から1年間の記事一覧

LaTeX + Beamer でスライドを作る

理系の大学生は何かとプレゼンテーションを要求される。昔はフィルムのスライドやOHPシートを使っていたらしいが今では計算機で作成したスライドを用いるのが普通である。よく用いられるのはMS PowerPointであるが私にとっては使い辛い(使いたくない!!!…

PythonTeXとSymPy

PythonTeXとSymPyの組み合わせを見てみる。なおSymPyの解説はありません。

PythonTeXとMatplotlib

今回はMatplotlibで作成したグラフをPythonTeXに半自動的にLaTeXドキュメントに埋め込む方法を説明する。何故半自動なのかは察してください。 なおPythonTeXに関しては PythonTeXで遊ぶ - 何かを書き留める何か に拙い解説がある。なおMatplotlib自体の解説…

PythonTeXで遊ぶ

この記事はhttp://tug.org/tug2013/program.html:=TUG 2013のプログラムでPythonTeXという言葉を見かけてしまった故の記録である。

Markov連鎖アルゴリズムによるデタラメ英文

プログラミング作法作者: ブライアンカーニハン,ロブパイク,Brian Kernighan,Rob Pike,福崎俊博出版社/メーカー: アスキー発売日: 2000/11メディア: 単行本購入: 58人 クリック: 1,152回この商品を含むブログ (203件) を見る "プログラム作法"の第3章ではラ…

Windows環境でTeXLive 2013 と TeXworks を使う

世の中にはLaTeXの導入の方法など沢山流布していて、奥村先生の本もあるので需要がなさそうだが、折角なので研究室内で配布した自己流導入マニュアルをもとにWindows環境での導入方法を書いてみる。LaTeXは使いたいが難しいことはしたくない人向けの内容であ…

Pythonによるファイル名一括リネーム

Pythonの習作として。 習作といっても自分で考えたところなど皆無に等しいが。 # -*- coding: UTF-8 -*- import os import sys os.chdir(sys.argv[1]) i = 0 for filename in os.listdir("."): os.rename(filename, sys.argv[2]+"{0:03d}".format(i) +os.pat…

RSA暗号を実装する

実装すると言っても通用するのは精々学部のレポートまで、理屈をよくわかっている仲間内で遊び半分で使うならともかく役に立たないと思われる。

Let's Note CF-T4 に Lubuntu をインストールする

研究室に松下電工謹製Let's note CF-T4 がある。 数年前までプレゼンテーションに用いていたが動作がもっさりしていて最近は放置していた。 そこでOSをWindows XPからLubuntuに移行して再利用することを思い立った。 方法として簡単そうなUSBブートを採用す…

架空の企業の採用 Question and Answer

架空の企業の新卒採用Webサイトに書いてあったことをまとめた。 残業はありますか? 弊社には定められた勤務時間(09:00~18:00)以外の勤務は一切ありませんし残業は禁止しています。ですが社員は自主的に奉仕活動として勤務を続けています。 文系・理系で…

今野晴貴『ヤバい会社の餌食にならないための労働法』

ヤバい会社の餌食にならないための労働法 (幻冬舎文庫)作者: 今野晴貴出版社/メーカー: 幻冬舎発売日: 2013/06/11メディア: 文庫この商品を含むブログを見る 労働問題を扱うNPO代表でありブラック企業に関する著書で有名な今野晴貴氏による薄い文庫本。 『マ…

Project Euler Problem 25

The Fibonacci sequence is defined by the recurrence relation: F_{n} = F_{n}−1 + F_{n}−2, where F_{1} = 1 and F_{2} = 1.The 12th term, F_{12}, is the first term to contain three digits. What is the first term in the Fibonacci sequence to co…

B. L. van der Waerden 『Algebra』

Algebra : Volume I作者: B.L. van der Waerden,F. Blum,J.R. Schulenberg出版社/メーカー: Springer発売日: 2003/10/21メディア: ペーパーバック購入: 2人 クリック: 2回この商品を含むブログを見る B. L. van der Waerden 『Algebra』Springer抽象代数学の…

Project Euler Problem 24

A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabetically, we call it lexicographic order. The lexicog…

Project Euler Problem 23

A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which means that 28 is a perfect number. A number n i…

Project Euler Problem 22

Using names.txt, a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to…

Project Euler Problem 21

Let $d(n)$ be defined as the sum of proper divisors of $n$ (numbers less than $n$ which divide evenly into $n$). If $d(a) = b$ and $d(b) = a$, where $a \not= b$, then $a$ and $b$ are an amicable pair and each of $a$ and $b$ are called amic…

就職活動中

就職活動が忙しくてProject Eulerに時間を割り当てることができないのが辛い。Project Eulerに限らず数学を楽しむ時間が相当削られるのが辛い。 年度末には事務作業が上から沢山降ってきて、今年度に限っては一段と面倒な仕事がやってくる。仕事と言うのは有…

Project Euler Problem 20

n! means n (n 1) ... 3 2 1 For example, 10! = 10 9 ... 3 2 1 = 3628800,and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27. Find the sum of the digits in the number 100! http://projecteuler.net/problem=20 100の階…

Project Euler Problem 19

You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has twen…

Project Euler Problem 17

If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total. If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letter…

Project Euler Problem 16

2^(15) = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.What is the sum of the digits of the number 2^(1000)? http://projecteuler.net/problem=16 2^(1000)の各桁の和を求める問題。力任せに書くと次のようになるか: ---- sum(map(int,s…

Project Euler Problem 15

Starting in the top left corner of a 22 grid, there are 6 routes (without backtracking) to the bottom right corner. How many routes are there through a 2020 grid? http://projecteuler.net/problem=15 20*20の格子の左上から右下へ行く最短経路の…

Project Euler Problem 14

The following iterative sequence is defined for the set of positive integers: n n/2 (n is even) n 3n + 1 (n is odd) Using the rule above and starting with 13, we generate the following sequence: 13 40 20 10 5 16 8 4 2 1 It can be seen that…

Project Euler Problem 13

Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. 37107287533902102798797998220837590246510135740250 46376937677490009712648124896970078050417018260538 7432498619952474105947423330951305812372661730962…

Project Euler Problem 12

The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... Let us list the factors…

Project Euler Problem 11

In the 2020 grid below, four numbers along a diagonal line have been marked in red. 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 81 49 31 73 55 79 14 29 93 71 40 67…

Project Euler Problem 10

The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million. http://projecteuler.net/problem=10 200万以下の素数の和を求める問題。 例によってSageの組み込み函数を用いる。 ---- print sum(prime_range(…

Project Euler Problem 9

A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 = 9 + 16 = 25 = 5^2 There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc http://proj…

Project Euler Problem 8

Find the greatest product of five consecutive digits in the 1000-digit number. 73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 85861560789112949495459501737958331952853208805511 1254069…