Showing posts with label Algorithms. Show all posts
Showing posts with label Algorithms. Show all posts

Started using Kaggle a while back, profile link for Darrell Ulm

 Started using Kaggle a while back, profile link for Darrell Ulm : https://www.kaggle.com/darrellulm 

I’m someone who enjoys learning new things and working through interesting technical challenges. My background is in Computer Science, and over time I’ve worked with several programming languages such as Python, C, C++, and PHP/MySQL. I like exploring data driven problems, parallel computing, and the kinds of algorithms that make systems more efficient.

I have experience using tools like Apache Spark for large scale data processing, and I’ve been spending more time studying different areas of Artificial Intelligence, including neural networks and modern language models. I’m always trying to understand how these ideas work in practice and how they can be applied in useful ways.

I also have a long history with web development and content management systems. Drupal has been a major part of that work, and I’ve used versions from 4 through 10 on a variety of projects.

Overall, I’m here to keep improving my skills, learn from others, and contribute wherever I can.

Discovering ORCID.org and Revisiting My ( Darrell Ulm )Research in Parallel Processing and Associative Computing

ORCid.org is a research publication database (mine: Darrell Ulm) 

I recently came across ORCID.org, a platform that\helps researchers organize and present their scholarly work in a structured and reliable way. It surprised me that I had not used it earlier because it offers a level of control and clarity that is incredibly useful when managing decades of publications. As I began adding my research history, I found myself reflecting on the themes that have shaped my work in parallel processing, associative computing, and algorithmic problem solving. It felt a bit like rediscovering old tools in a workshop that I somehow forgot I built.

A Look Back at My Research Contributions

Much of my work has focused on high performance computing, data parallelism, and innovative approaches to classic optimization problems. ORCID gave me a chance to revisit these contributions and understand how they fit together across time.

Parallel and Distributed Processing

Several of my publications appeared in the International Parallel and Distributed Processing Symposium. These works explored new ways to model and simulate parallel computation.

  • Stream PRAM Presented at the 19th International Parallel and Distributed Processing Symposium (IPDPS 2005). This work examined a streaming approach to the Parallel Random Access Machine model and how it can be adapted for modern architectures.

  • Solving a 2D Knapsack Problem Using a Hybrid Data Parallel and Control Style of Computing Presented at IPDPS 2004. This research combined data parallelism with control driven techniques to tackle a complex two dimensional knapsack optimization problem.

Distributed Systems and Global Knowledge

  • World Wide Wisdom Published in IEEE Distributed Systems Online in 2004. This article explored early ideas about distributed knowledge systems and how global information sharing could reshape computing. Looking back, it feels like a precursor to many of the collaborative systems we take for granted today. It's just a book review and I reviewed it because it seemed like an important book.

Associative Computing and Simulation Models

My earlier work focused heavily on associative computing models and how they could simulate or enhance traditional parallel architectures.

  • Simulating PRAM with a MSIMD Model (ASC) Presented at the 1998 International Conference on Parallel Processing. This paper demonstrated how a Multiple Single Instruction Multiple Data model could simulate PRAM behavior with efficiency and scalability.

  • Solving a 2D Knapsack Problem on an Associative Computer Augmented with a Linear Network Presented at PDPTA 1996. This work extended associative computing techniques by integrating a linear network to improve communication and problem solving performance.

  • Virtual Parallelism by Self Simulation of the Multiple Instruction Stream Associate Model Also presented at PDPTA 1996. This research introduced a method for achieving virtual parallelism through self simulation, allowing complex instruction streams to be executed more efficiently.

Mesh and SIMD Based Optimization

Some of my earliest work focused on solving optimization problems on mesh and SIMD architectures.

  • Solving a Two Dimensional Knapsack Problem on a Mesh with Multiple Buses Presented at the 1995 International Conference on Parallel Processing. This paper explored how mesh based systems with multiple communication buses could accelerate knapsack computations.

  • Solving a Two Dimensional Knapsack Problem on SIMD Computers Presented at the 1992 International Conference on Parallel Processing. This was one of my foundational works, showing how SIMD architectures could be used to solve complex optimization problems that traditionally required more flexible computing models.

Why ORCID Matters for Researchers

Organizing all of these publications in one place reminded me how valuable it is to have a persistent and authoritative record of scholarly work. ORCID makes it easier to present research clearly, connect publications to identifiers like DOIs, and maintain a consistent academic identity across platforms. It also helps highlight the evolution of a research career, something that is easy to lose track of when your work spans many years and many conferences.

As I continue refining my ORCID profile, I am finding it to be a surprisingly helpful tool. It brings structure to a long timeline of ideas, experiments, and problem solving approaches. Maybe I should have used it earlier, but better late than never. My brain probably just took a small detour somewhere along the way.


Getting back into parallel computing with Apache Spark

Returning to parallel computing with Apache Spark has been insightful, especially observing the increasing mainstream adoption of the McColl and Valiant BSP (Bulk Synchronous Parallel) model beyond GPUs. This structured approach to parallel computation, with its emphasis on synchronized supersteps, offers a practical framework for diverse parallel architectures.While setting up Spark on clusters can involve effort and introduce overhead, ongoing optimizations are expected to enhance its efficiency over time. Improvements in data handling, memory management, and query execution aim to streamline parallel processing.A GitHub repository for Spark snippets has been created as a resource for practical examples. As Apache Spark continues to evolve in parallel with the HDFS (Hadoop Distributed File System), this repository intends to showcase solutions leveraging their combined strengths for scalable data processing.



Scala Version of Approximation Algorithm for Knapsack Problem for Apache Spark

This is the Scala version of the approximation algorithm for the knapsack problem using Apache Spark.

I ran this on a local setup, so it may require modification if you are using something like a Databricks environment. Also you will likely need to setup your Scala environment.

All the code for this is at GitHub

First, let's import all the libraries we need.


import org.apache.spark._
import org.apache.spark.rdd.RDD
import org.apache.spark.SparkConf
import org.apache.spark.SparkContext._
import org.apache.spark.sql.DataFrame
import org.apache.spark.sql.SparkSession
import org.apache.spark.sql.functions.sum

We'll define this object knapsack, although it could be more specific for what this is doing, it's good enough for this simple test.

object knapsack {


Again, we'll define the knapsack approximation algorithm, expecting a dataframe with the profits and weights, as well as W, a total weight.

  def knapsackApprox(knapsackDF: DataFrame, W: Double): DataFrame = {


Calculate the ratios of profit over weight, and sort them high to low ratio. Discard any weights that are already larger than the max knapsack size, W.

    val ratioDF = knapsackDF.withColumn("ratio", knapsackDF("values") / knapsackDF("weights"))
    val newRatioDF = (ratioDF
      .filter(ratioDF("weights") <= W)
      .sort(ratioDF("ratio").desc)
      )

Now we'll use SQL to add up all the partial sums of weights. A window function is another way this could work with SQL. This will tell us what can fit in the knapsack, and remember these are sorted by profit to weight ratio, high to low.


    newRatioDF.createOrReplaceTempView("tempTable")
    val partialSumWeightsDF = spark.sql("SELECT item, weights, values, ratio, sum(weights) OVER (ORDER BY ratio desc) as partSumWeights FROM tempTable")
    val partialSumWeightsFilteredDF = (
       partialSumWeightsDF
        .filter(partialSumWeightsDF("partSumWeights") <= W)
      )

And now return this new Dataframe, which will have only the objects that fit.

    partialSumWeightsDF
  }
}

So this will return the greedy solution, which is fast and easy use parallelism, but is not optimal. Parallel solutions to optimal knapsack algorithms, are often not as simple, but this was a good way to test out Spark using Scala.

And here is the test code, which is pretty self explanatory, the Github is some work in progress and I've some clean up to do.

import org.apache.spark.mllib.random.RandomRDDs._
import scala.collection.mutable.ListBuffer<- ------------------------------------------="" -="" 0.3="" 0.6="" 10.0="" 1="" 5.="" a="" alue="" and="" approximate="" approximation="" call="" countresult="" create="" data:="" data="" dataframe.="" dataframe="" display="" eights="" elected="" elements:="" elements="" end="" find="" for="" function="" greedy="" item="" item_="" k.tostring="" knapresults.show="" knapresults="knapsack.knapsackApprox(knapsackData," knapsack.="" knapsack="" knapsackdata.show="" knapsackdata="sc.parallelize(knapsackDataList).toDF(" knapsackdatalist="knapsackDataListBuffer.toList" knapsackdatalistbuffer="" make="" maximum="" n="" of="" original="" ount:="" pre="" println="" r.nextdouble="" r="" random="" results="" riginal="" s="" selected="" show="" size="" start="" test="" the="" to="" total:="" totals.="" totals="" val="" value="" values="" valuesresult.show="" valuesresult="knapResults.agg(sum(" w="" weight.="" weight="" weights="" weightsresult.show="" weightsresult="knapResults.agg(sum(" with="">
import org.apache.spark.mllib.random.RandomRDDs._
import scala.collection.mutable.ListBuffer

// Knapsack problem size.
val N = 10

// Random
val r = scala.util.Random

// Setup sample data for knapsack.
val knapsackDataListBuffer = ListBuffer[(String, Double, Double)]()
for (k <- 1 to N) {
  knapsackDataListBuffer += (("item_" + k.toString, r.nextDouble() * 10.0, r.nextDouble() * 10.0))
}
val knapsackDataList = knapsackDataListBuffer.toList

// Make a Dataframe with item(s), weight(s), and value(s) for the knapsack.
val knapsackData = sc.parallelize(knapsackDataList).toDF("item", "weights", "values")

// Display the original data
println("Original Data:")
knapsackData.show()
println("\r\n")

// Create a random maximum weight
val start = N * 0.3
val end = N * 0.6
val W = (math.random * (end - start) + start)

// Show the weight.
println("W: ")
println(W)
println("\r\n")

// Call the knapsack greedy approximation function, with data and size 5.
val knapResults = knapsack.knapsackApprox(knapsackData, W)

// Show the results Dataframe.
println("Selected Elements:")
knapResults.show()
println("\r\n")

// Find the totals.
val valuesResult = knapResults.agg(sum("values"))
val weightsResult = knapResults.agg(sum("weights"))
val countResult = knapResults.count()

// Show totals for selected elements of knapsack.
println("Value Total:")
valuesResult.show()
println("\r\n")
println("Weights Total:")
weightsResult.show()
println("\r\n")
println("Count:")
println(countResult)
println("\r\n")

And that is it, just create some random items, call the knapsackApprox(knapsackData, W) function, and print out the results. Note, I summed it outside of the main knapsack routine, which just finds the objects that satisfy the problem. Next tasks are: clean up the code for Scala, convert to window function, and complete the Java version.

Darrell Ulm Computer Science Research: Simulating PRAM with a MSIMD Model (ASC), bibliography reference


Darrell Ulm: Simulating PRAM with a MSIMD Model (ASC)
This is a CiteSeer bibliography reference to this computer science research paper dealing with a simulation of PRAM with the MASC multiple instruction stream data-parallel model.

Tumblr, Wordpress

Darrell Ulm: Computer Science and Software Development

I am Darrell Ulm , a software developer,  with broad interests across computer science and modern software engineering. My work spans algorithms, parallel and data-parallel computing, Apache Spark, signal processing, graphics, and open source software. I have developed in many languages and environments, including Assembly, C/C++, C#, PHP, MySQL, Unity3D, and enterprise content management systems.

Drupal stands out to me as one of the most powerful and interesting CMS platforms I have worked with, while WordPress continues to impress with its rapid evolution, flexibility, and massive plugin ecosystem. GitHub has long been my main hub for open source work, though I have been increasingly interested in GitLab. I have also explored older platforms like SourceForge and profile aggregators such as OpenHub.

I stay active in developer and knowledge sharing communities such as StackExchange, CodeProject, Codecademy, TopCoder, and Quora, and I use SlideShare to bookmark useful technical presentations. My research interests are reflected in profiles on ResearchGate, DBLP, and Microsoft Academic. 

One project I am particularly proud of is a Drupal Google Books module built using the Google Books API, which highlights my interest in practical API integration and open source contribution.

Threads.com Darrell R Ulm Profile Page

Below is a quick review and overview of development and major site profiles evaluated, more details in the blog posts:
  • Possibly the most complex content management system (CMS): Drupal, although Joomla is up there.
  • Git code repository with the best front end, Ruby implementation: GitHub. GitHub is great for so many reasons, although really starting to get into GitLab!
  • Excellent Apache Spark in the cloud with an Amazing notebook style front end: Databricks
  • Hadoop and more Hadoop, Hortonworks, which I've looked at but have been learning more about Apache Spark. 
  • Darrell Ulm Tumblr site
  • Wordpress is great and has been putting in all types of cool enhancements in the past years, and is really widespread: Darrell Ulm Wordpress profile
  • Find answers, ask question about tech and about many useful things, in this case for Drupal: StackExchange Drupal, Darrell Ulm Profile
  • An older site for open source code, have some small code exercises here, SourceForge, just because SourceForge is there. 
  • Evaluating Weebly just to be complete, made a quick Weebly Site Profile for myself to see how it worked. Surprisingly for a quick small web site, it is fine.
  • The OpenHub profile, is an interesting site which pulls in open source code by user and presents a listing. Not sure how much it is used these days, but it reminds one of GitHub in the early days.
  • I had to try out how Ted Profiles, pretty clean and the idea is mainly to like or keep track of Ted Talks a user is interested.
  • Along the same lines created a more useful Darrell Ulm GoodReads list for books read, books interested in reading or rating. Software is pretty good with a few interface issues.
  • There are many good presentations at SlideShare, and I had to make an account. Some of the profile linkage does not work, and wondering if updates are not happening on the software. Even so, SlideShare is a useful tool to bookmark slide presentations for researching a topic.
  • The Quora site is an interesting place to have a Profile, and I made one for Darrell Ulm, to learn and answer questions about technologies, software development, computer science and math.
  • So I was ready when needing to work with Wordpress, have an account for Darrell Ulm on Wordpress.org for support , and again Wordpress is impressive these days, usful for more enterprise custom sites than ever before with an active plug-in and theme development community.
  • There are two profile for Wordpress, so have one for my Darrell Ulm profiles, this one different, from the support profile and is for rating modules and similar functions.
  • Have to have a Google+ for Darrell Ulm profile page because, it's Google. Seems like people are using it and it could be a useful tool.
  • I designed and developer the Google Books Drupal Module, which is here on Github which uses the Google Books API for a search term or ISBN and returns data to use in a Drupal Text Filter.
  • The CodeProject Profile again is a good site for finding coding standards and tricks and tips on writing software in many languages.
  • This is an outdated link for Kent State University, research papers as well as others. This link is still a decent compilation of the pdf files up to a certain date for associative computing (data-parallel computing).
  • At this site is a listing for Publications on Research Gate, a site with possibly the best interface for an online academic publication profile. 
  • Made an Etsy Profile for Darrell Ulm, as there are some interesting tech or nerd related gadgetry available on Etsy. 
  • Another profile: Instagram Profile for Darrell R Ulm, and someday I could post something. Apparently that is still OK.
  • A genuinely excellent site codecademy, and I've got a Profile for Darrell Ulm here also, has great tutorials for several popular computer languages, and it is worth checking out.
  • A new page popped up called Libraries.IO Github, and it appears to be an automated overview of Github users and a short list of code contributed.
  • The http://dblp.uni-trier.de site has a nice Computer Science Bibliography which has been around for some time and is pretty accurate as far as the data goes.
  • The Mozilla project has a profile for plug-in developers here , it's honed down to a simple setup and this is where you can post developer Firefox plug-ins.
  • As for a gamified  developer profile, Microsoft has one, i.e. Microsoft MSDN, and it has some gamified elements that other developer profiles are starting to show. The whole idea of goal setting for development is interesting.
  • Microsoft Academic is looking better.
  • As most of these profiles, looking at evaluating my TopCoder Profile, and this one is pretty great. When things are not as intense with projects, need to try out a couple of contests.
  • And a Pinterest profile mostly with ceramic handmade tiles.