1) Write a function reverse(A) which takes a matrix A of arbitrary dimensions as input and returns a matrix B consisting of the columns of A in reverse order. Thus for example, if
A = 1 2 3 then B = 3 2 1
4 5 6 6 5 4
7 8 9 9 8 7
Write a main program to call reverse(A) for the matrix A = magic(5 ...
北京大学ACM比赛题目
In 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the following conjecture:
Every even number greater than 4 can be
written as the sum of two odd prime numbers.
For example:
8 = 3 + 5. Both 3 and 5 are odd prime n ...
北京大学ACM比赛题目
Write a program to read four lines of upper case (i.e., all CAPITAL LETTERS) text input (no more than 72 characters per line) from the input file and print a vertical histogram that shows how many times each letter (but not blanks, digits, or punctuation) appears in the all-upper ...
Huo Chess by Spiros (Spyridon) Kakos (http://www.kakos.com.gr) is a micro chess program in CLI C++ v8.0 that attempts to be smaller in size than the Commodore-era Microchess. The goal is to create the smallest chess program that exists. More versions are to come in the future.
This LDPC software is intended as an introduction to LDPC codes computer based simulation. The pseudo-random irregular low density parity check matrix is based on Radford M. Neal’s programs collection, which can be found in [1]. While Neal’s collection is well documented, in my opinion, C source c ...
I ve written some many years ago dynamic Huffman algorithm to compress and decompress data. It is mainly targeted to data with some symbols occuring more often than the rest (e.g. having some data file consisted of 3 different symbols and their total number of occurence in that file s1(1000), s2(200 ...
Sequential Monte Carlo without Likelihoods
粒子滤波不用似然函数的情况下
本文摘要:Recent new methods in Bayesian simulation have provided ways of evaluating posterior distributions
in the presence of analytically or computationally intractable likelihood functions.
Despite representing a substantial ...
This LDPC software is intended as an introduction to LDPC codes computer based simulation. The pseudo-random irregular low density parity check matrix is based on Radford M. Neal’s programs collection, which can be found in [1]. While Neal’s collection is well documented, in my opinion, C source c ...