Ackermann Function Written in Java

Sat Apr 18 2015

class Ackermann_function
{
    public static void main(String[] args)
    {
        //prints intro

        System.out.println("This program will solve for all values in ackermann
function using recursion.1");

        System.out.println("**************************n")
        //calls for all values of ackerman using for loop
        for(int i = 0; i < 6; i ++)
        {
            for(int j = 0; j < 10; j ++)
            {
                System.out.println("Ackerman (" + i + "," + j + ") is: " +
ack(i,j));
            }
        }

        //test sinlge
        //System.out.println(ack(3,1));
    }

    public static int ack(int m, int n)
    {
        if(m == 0)
        {
            return(n + 1);
        }
        else if(m > 0 && n == 0)
        {
            return(ack(m-1,1));
        }
        else if(m >0 && n > 0);
        {
            return(ack(m-1, ack(m,n-1)));
        }
    }
}

The Ackermann function is a classic example of a function that is not primitive recursive – you cannot solve it using loops like Fibonacci. In other words, you have to use recursion to solve for values of the Ackermann function.

For more information on the Ackermann function click here.



DDR4 Ram Introduction

Fri Mar 06 2015

0.1 Overview

DDR4 ram is the successor to DDR3 ram and has many benefits. DDR3 ram is currently what most computers use, and it came out in 2007.

0.2 What DRR4 Stand for:

Double Data Rate Fourth Generation Synchronous Dynamic Random-Access Memory

0.3 DDR4 achieved higher efficiency



Time Lapse Programming Zombie game

Mon Jan 05 2015

This is a simple zombie shooter game that I made in visual basics. The graphics are very basic due to copyrights that I wanted to avoid – and lack of artistic abilities. However, this game is meant to be a demo so that you can learn something from what I did. If you enjoyed this feel free to download the source code (linked below).



Time Lapse Programming Pong

Sat Dec 27 2014

Downloads:

VB programming picture
VB programming picture



Ways to Avoid Getting Hacked

Sat Dec 27 2014

Please note that these are just personal recommendations, and this article was written in 2014.

  1. Avoid bad websites.